Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device

ABSTRACT

A three-dimensional data encoding method of encoding three-dimensional points includes: calculating a new predicted value as a predicted value, using attribute information items of one or more second three-dimensional points neighboring a first three-dimensional point, and assigning the predicted value to at least one prediction mode among two or more prediction modes, the new predicted value being used for calculating an attribute information item of the first three-dimensional point; selecting one prediction mode from the two or more prediction modes; calculating a prediction residual which is a difference between the attribute information item of the first three-dimensional point and the predicted value of the one prediction mode selected; and generating a bitstream including the one prediction mode and the prediction residual.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a U.S. continuation application of PCT InternationalPatent Application Number PCT/JP2019/024298 filed on Jun. 19, 2019,claiming the benefit of priority of U.S. Provisional Patent ApplicationNo. 62/686,872 filed on Jun. 19, 2018, U.S. Provisional PatentApplication No. 62/699,243 filed on Jul. 17, 2018, U.S. ProvisionalPatent Application No. 62/699,388 filed on Jul. 17, 2018, and U.S.Provisional Patent Application No. 62/716,628 filed on Aug. 9, 2018, theentire contents of which are hereby incorporated by reference.

BACKGROUND 1. Technical Field

The present disclosure relates to a three-dimensional data encodingmethod, a three-dimensional data decoding method, a three-dimensionaldata encoding device, and a three-dimensional data decoding device.

2. Description of the Related Art

Devices or services utilizing three-dimensional data are expected tofind their widespread use in a wide range of fields, such as computervision that enables autonomous operations of cars or robots, mapinformation, monitoring, infrastructure inspection, and videodistribution. Three-dimensional data is obtained through various meansincluding a distance sensor such as a rangefinder, as well as a stereocamera and a combination of a plurality of monocular cameras.

Methods of representing three-dimensional data include a method known asa point cloud scheme that represents the shape of a three-dimensionalstructure by a point group (point cloud) in a three-dimensional space.In the point cloud scheme, the positions and colors of a point cloud arestored. While point cloud is expected to be a mainstream method ofrepresenting three-dimensional data, a massive amount of data of a pointcloud necessitates compression of the amount of three-dimensional databy encoding for accumulation and transmission, as in the case of atwo-dimensional moving picture (examples include MPEG-4 AVC and HEVCstandardized by MPEG).

Meanwhile, point cloud compression is partially supported by, forexample, an open-source library (Point Cloud Library) for pointcloud-related processing.

Furthermore, a technique for searching for and displaying a facilitylocated in the surroundings of the vehicle is known (for example, seeInternational Publication WO 2014/020663).

SUMMARY

There has been a demand for reducing the code amount in encoding ofthree-dimensional data.

The present disclosure has an object to provide a three-dimensional dataencoding method, a three-dimensional data decoding method, athree-dimensional data encoding device, or a three-dimensional datadecoding device that is capable of reducing the code amount.

A three-dimensional data encoding method according to an aspect of thepresent disclosure is a three-dimensional data encoding method ofencoding three-dimensional points, and includes: calculating a newpredicted value as a predicted value, using attribute information itemsof one or more second three-dimensional points neighboring a firstthree-dimensional point, and assigning the predicted value to at leastone prediction mode among two or more prediction modes, the newpredicted value being used for calculating an attribute information itemof the first three-dimensional point; selecting one prediction mode fromthe two or more prediction modes; calculating a prediction residualwhich is a difference between the attribute information item of thefirst three-dimensional point and the predicted value of the oneprediction mode selected; and generating a bitstream including the oneprediction mode and the prediction residual.

A three-dimensional data decoding method according to an aspect of thepresent disclosure is a three-dimensional data decoding method ofdecoding encoded three-dimensional points, and includes: selecting oneprediction mode from two or more prediction modes included in abitstream; calculating a new predicted value as a predicted value, usingattribute information items of one or more second three-dimensionalpoints neighboring a first three-dimensional point, the new predictedvalue being used for calculating an attribute information item of thefirst three-dimensional point corresponding to the one prediction modeselected; and calculating the attribute information item of the firstthree-dimensional point using the predicted value calculated.

The present disclosure can provide a three-dimensional data encodingmethod, a three-dimensional data decoding method, a three-dimensionaldata encoding device, or a three-dimensional data decoding device thatis capable of reducing the code amount.

BRIEF DESCRIPTION OF DRAWINGS

These and other objects, advantages and features of the disclosure willbecome apparent from the following description thereof taken inconjunction with the accompanying drawings that illustrate a specificembodiment of the present disclosure.

FIG. 1 is a diagram showing the structure of encoded three-dimensionaldata according to Embodiment 1;

FIG. 2 is a diagram showing an example of prediction structures amongSPCs that belong to the lowermost layer in a GOS according to Embodiment1;

FIG. 3 is a diagram showing an example of prediction structures amonglayers according to Embodiment 1;

FIG. 4 is a diagram showing an example order of encoding GOSs accordingto Embodiment 1;

FIG. 5 is a diagram showing an example order of encoding GOSs accordingto Embodiment 1;

FIG. 6 is a block diagram of a three-dimensional data encoding deviceaccording to Embodiment 1;

FIG. 7 is a flowchart of encoding processes according to Embodiment 1;

FIG. 8 is a block diagram of a three-dimensional data decoding deviceaccording to Embodiment 1;

FIG. 9 is a flowchart of decoding processes according to Embodiment 1;

FIG. 10 is a diagram showing an example of meta information according toEmbodiment 1;

FIG. 11 is a diagram showing an example structure of a SWLD according toEmbodiment 2;

FIG. 12 is a diagram showing example operations performed by a serverand a client according to Embodiment 2;

FIG. 13 is a diagram showing example operations performed by the serverand a client according to Embodiment 2;

FIG. 14 is a diagram showing example operations performed by the serverand the clients according to Embodiment 2;

FIG. 15 is a diagram showing example operations performed by the serverand the clients according to Embodiment 2;

FIG. 16 is a block diagram of a three-dimensional data encoding deviceaccording to Embodiment 2;

FIG. 17 is a flowchart of encoding processes according to Embodiment 2;

FIG. 18 is a block diagram of a three-dimensional data decoding deviceaccording to Embodiment 2;

FIG. 19 is a flowchart of decoding processes according to Embodiment 2;

FIG. 20 is a diagram showing an example structure of a WLD according toEmbodiment 2;

FIG. 21 is a diagram showing an example octree structure of the WLDaccording to Embodiment 2;

FIG. 22 is a diagram showing an example structure of a SWLD according toEmbodiment 2;

FIG. 23 is a diagram showing an example octree structure of the SWLDaccording to Embodiment 2;

FIG. 24 is a block diagram of a three-dimensional data creation deviceaccording to Embodiment 3;

FIG. 25 is a block diagram of a three-dimensional data transmissiondevice according to Embodiment 3;

FIG. 26 is a block diagram of a three-dimensional information processingdevice according to Embodiment 4;

FIG. 27 is a block diagram of a three-dimensional data creation deviceaccording to Embodiment 5;

FIG. 28 is a diagram showing a structure of a system according toEmbodiment 6;

FIG. 29 is a block diagram of a client device according to Embodiment 6;

FIG. 30 is a block diagram of a server according to Embodiment 6;

FIG. 31 is a flowchart of a three-dimensional data creation processperformed by the client device according to Embodiment 6;

FIG. 32 is a flowchart of a sensor information transmission processperformed by the client device according to Embodiment 6;

FIG. 33 is a flowchart of a three-dimensional data creation processperformed by the server according to Embodiment 6;

FIG. 34 is a flowchart of a three-dimensional map transmission processperformed by the server according to Embodiment 6;

FIG. 35 is a diagram showing a structure of a variation of the systemaccording to Embodiment 6;

FIG. 36 is a diagram showing a structure of the server and clientdevices according to Embodiment 6;

FIG. 37 is a block diagram of a three-dimensional data encoding deviceaccording to Embodiment 7;

FIG. 38 is a diagram showing an example of a prediction residualaccording to Embodiment 7;

FIG. 39 is a diagram showing an example of a volume according toEmbodiment 7;

FIG. 40 is a diagram showing an example of an octree representation ofthe volume according to Embodiment 7;

FIG. 41 is a diagram showing an example of bit sequences of the volumeaccording to Embodiment 7;

FIG. 42 is a diagram showing an example of an octree representation of avolume according to Embodiment 7;

FIG. 43 is a diagram showing an example of the volume according toEmbodiment 7;

FIG. 44 is a diagram for describing an intra prediction processaccording to Embodiment 7;

FIG. 45 is a diagram for describing a rotation and translation processaccording to Embodiment 7;

FIG. 46 is a diagram showing an example syntax of an RT flag and RTinformation according to Embodiment 7;

FIG. 47 is a diagram for describing an inter prediction processaccording to Embodiment 7;

FIG. 48 is a block diagram of a three-dimensional data decoding deviceaccording to Embodiment 7;

FIG. 49 is a flowchart of a three-dimensional data encoding processperformed by the three-dimensional data encoding device according toEmbodiment 7;

FIG. 50 is a flowchart of a three-dimensional data decoding processperformed by the three-dimensional data decoding device according toEmbodiment 7;

FIG. 51 is a diagram illustrating an example of three-dimensional pointsaccording to Embodiment 8;

FIG. 52 is a diagram illustrating an example of setting LoDs accordingto Embodiment 8;

FIG. 53 is a diagram illustrating an example of setting LoDs accordingto Embodiment 8;

FIG. 54 is a diagram illustrating an example of attribute information tobe used for predicted values according to Embodiment 8:

FIG. 55 is a diagram illustrating examples of exponential-Golomb codesaccording to Embodiment 8;

FIG. 56 is a diagram indicating a process on exponential-Golomb codesaccording to Embodiment 8;

FIG. 57 is a diagram indicating an example of a syntax in attributeheader according to Embodiment 8;

FIG. 58 is a diagram indicating an example of a syntax in attribute dataaccording to Embodiment 8;

FIG. 59 is a flowchart of a three-dimensional data encoding processaccording to Embodiment 8;

FIG. 60 is a flowchart of an attribute information encoding processaccording to Embodiment 8;

FIG. 61 is a diagram indicating processing on exponential-Golomb codesaccording to Embodiment 8;

FIG. 62 is a diagram indicating an example of a reverse lookup tableindicating relationships between remaining codes and the values thereofaccording to Embodiment 8;

FIG. 63 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 8;

FIG. 64 is a flowchart of an attribute information decoding processaccording to Embodiment 8;

FIG. 65 is a block diagram of a three-dimensional data encoding deviceaccording to Embodiment 8;

FIG. 66 is a block diagram of a three-dimensional data decoding deviceaccording to Embodiment 8;

FIG. 67 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 8;

FIG. 68 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 8;

FIG. 69 is a diagram showing a first example of a table representingpredicted values calculated in prediction modes according to Embodiment9;

FIG. 70 is a diagram showing examples of attribute information items(pieces of attribute information) used as the predicted values accordingto Embodiment 9;

FIG. 71 is a diagram showing a second example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9;

FIG. 72 is a diagram showing a third example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9;

FIG. 73 is a diagram showing a fourth example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9;

FIG. 74 is a diagram showing a fifth example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9;

FIG. 75 is a diagram showing a sixth example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9;

FIG. 76 is a diagram showing a seventh example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9;

FIG. 77 is a diagram showing an eighth example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9;

FIG. 78 is a diagram showing a first example of a binarization table inbinarizing and encoding prediction mode values according to Embodiment9;

FIG. 79 is a diagram showing a second example of a binarization table inbinarizing and encoding the prediction mode values according toEmbodiment 9;

FIG. 80 is a diagram showing a third example of a binarization table inbinarizing and encoding the prediction mode values according toEmbodiment 9;

FIG. 81 is a diagram for describing an example of encoding binary datain the binarization table in binarizing and encoding the predictionmodes according to Embodiment 9;

FIG. 82 is a flowchart of an example of encoding a prediction mode valueaccording to Embodiment 9;

FIG. 83 is a flowchart of an example of decoding a prediction mode valueaccording to Embodiment 9;

FIG. 84 is a diagram showing a first example of a table containingpredicted values for prediction modes according to Embodiment 10;

FIG. 85 is a diagram showing a second example of a table containingpredicted values for prediction modes according to Embodiment 10;

FIG. 86 is a diagram showing a third example of a table containingpredicted values for prediction modes according to Embodiment 10;

FIG. 87 is a diagram showing a fourth example of a table containingpredicted values for prediction modes according to Embodiment 10;

FIG. 88 is a diagram showing a fifth example of a table containingpredicted values for prediction modes according to Embodiment 10;

FIG. 89 is a diagram showing a sixth example of a table containingpredicted values for prediction modes according to Embodiment 10;

FIG. 90 is a flowchart of a first example of a calculation process for apredicted value by a three-dimensional data encoding device according toEmbodiment 10;

FIG. 91 is a flowchart of a selection process for a prediction modeshown in FIG. 90;

FIG. 92 is a flowchart of details of the selection process for aprediction mode shown in FIG. 91;

FIG. 93 is a flowchart of a first example of a process by athree-dimensional data decoding device according to Embodiment 10;

FIG. 94 is a flowchart of the decoding process for attribute informationshown in FIG. 93;

FIG. 95 is a flowchart of details of a calculation process for apredicted value shown in FIG. 94;

FIG. 96 is a flowchart of a second example of a calculation process fora predicted value by the three-dimensional data encoding deviceaccording to Embodiment 10;

FIG. 97 is a flowchart of a selection process for a prediction modeshown in FIG. 96;

FIG. 98 is a flowchart of details of the selection process for aprediction mode shown in FIG. 97;

FIG. 99 is a flowchart of a second example of a process by thethree-dimensional data decoding device according to Embodiment 10;

FIG. 100 is a flowchart of a decoding process for attribute informationshown in FIG. 99;

FIG. 101 is a flowchart of details of a calculation process for apredicted value shown in FIG. 100;

FIG. 102 is a flowchart of a first example of an assignment process fora new predicted value by the three-dimensional data encoding device andthe three-dimensional data decoding device according to Embodiment 10;

FIG. 103 is a flowchart of a second example of an assignment process fora new predicted value by the three-dimensional data encoding device andthe three-dimensional data decoding device according to Embodiment 10;

FIG. 104 is a flowchart of a third example of an assignment process fora new predicted value by the three-dimensional data encoding device andthe three-dimensional data decoding device according to Embodiment 10;

FIG. 105 is a diagram showing an example of attribute information usedin calculating a predicted value;

FIG. 106 is a diagram showing another example of attribute informationused in calculating a predicted value;

FIG. 107 is a flowchart of a three-dimensional data encoding process bythe three-dimensional data encoding device according to a variation;

FIG. 108 is a flowchart of an encoding process for attribute informationshown in FIG. 107;

FIG. 109 is a flowchart of a calculation process for a predicted valueshown in FIG. 108;

FIG. 110 is a flowchart of a selection process for a prediction modeshown in FIG. 109;

FIG. 111 is a flowchart of details of the selection process for aprediction mode shown in FIG. 110;

FIG. 112 is a flowchart of a decoding process by the three-dimensionaldata decoding device according to a variation of Embodiment 10;

FIG. 113 is a flowchart of a decoding process for attribute informationshown in FIG. 112;

FIG. 114 is a flowchart of a calculation process for a predicted valueshown in FIG. 113;

FIG. 115 is a flowchart of a decoding process for a prediction modeshown in FIG. 114;

FIG. 116 is a block diagram showing a configuration of an attributeinformation encoder provided in the three-dimensional data encodingdevice according to a variation of Embodiment 10;

FIG. 117 is a block diagram showing a configuration of an attributeinformation decoder provided in the three-dimensional data decodingdevice according to a variation of Embodiment 10;

FIG. 118 is a diagram showing a table containing predicted values forprediction modes according to a variation of Embodiment 10;

FIG. 119 is a diagram showing an example of attribute information usedin calculating a predicted value;

FIG. 120 is a flowchart of a three-dimensional data encoding process bythe three-dimensional data encoding device according to a variation ofEmbodiment 10;

FIG. 121 is a flowchart of an encoding process for attribute informationshown in FIG. 120;

FIG. 122 is a flowchart of a calculation process for a predicted valueshown in FIG. 121;

FIG. 123 is a flowchart of a selection process for a prediction modeshown in FIG. 122;

FIG. 124 is a flowchart of details of the selection process for aprediction mode shown in FIG. 123;

FIG. 125 is a flowchart of a decoding process by the three-dimensionaldata decoding device according to a variation;

FIG. 126 is a flowchart of a decoding process for attribute informationshown in FIG. 125;

FIG. 127 is a flowchart of a calculation process for a predicted valueshown in FIG. 126;

FIG. 128 is a flowchart of a decoding process for a prediction modeshown in FIG. 127;

FIG. 129 is a diagram showing a table containing predicted values forprediction modes according to a variation of Embodiment 10;

FIG. 130 is a diagram showing a first example of a table containingpredicted values for prediction modes according to a variation ofEmbodiment 10;

FIG. 131 is a diagram showing an example of attribute information usedin calculating a predicted value;

FIG. 132 is a diagram showing a second example of a table containingpredicted values for prediction modes according to a variation ofEmbodiment 10;

FIG. 133 is a diagram showing a third example of a table containingpredicted values for prediction modes according to a variation ofEmbodiment 10;

FIG. 134 is a flowchart of a three-dimensional data encoding process bythe three-dimensional data encoding device according to a variation ofEmbodiment 10;

FIG. 135 is a flowchart of an encoding process for attribute informationshown in FIG. 134;

FIG. 136 is a flowchart of a calculation process for a predicted valueshown in FIG. 135;

FIG. 137 is a flowchart of a process of assigning predicted values toprediction modes shown in FIG. 136;

FIG. 138 is a flowchart of details of a selection process for aprediction mode shown in FIG. 136;

FIG. 139 is a flowchart of a decoding process by the three-dimensionaldecoding device according to a variation of Embodiment 10;

FIG. 140 is a flowchart of a decoding process for attribute informationshown in FIG. 139;

FIG. 141 is a flowchart of a calculation process for a predicted valueshown in FIG. 140;

FIG. 142 is a flowchart of a process of assigning predicted values toprediction modes shown in FIG. 141;

FIG. 143 is a flowchart of another example of a calculation process fora predicted value shown in FIG. 135;

FIG. 144 is a flowchart of a process of assigning predicted values toprediction modes shown in FIG. 143;

FIG. 145 is a flowchart of details of a selection process for aprediction mode shown in FIG. 143;

FIG. 146 is a flowchart of another example of a calculation process fora predicted value shown in FIG. 140;

FIG. 147 is a flowchart of a process of assigning predicted values toprediction modes shown in FIG. 146;

FIG. 148 is a flowchart of an encoding process by a three-dimensionaldata encoding device according to Embodiment 10 and variations ofEmbodiment 10; and

FIG. 149 is a flowchart of a decoding process by a three-dimensionaldata decoding device according to Embodiment 10 and variations ofEmbodiment 10.

DETAILED DESCRIPTION OF THE EMBODIMENTS

A three-dimensional data encoding method according to an aspect of thepresent disclosure is a three-dimensional data encoding method ofencoding three-dimensional points, and includes: calculating a newpredicted value as a predicted value, using attribute information itemsof one or more second three-dimensional points neighboring a firstthree-dimensional point, and assigning the predicted value to at leastone prediction mode among two or more prediction modes, the newpredicted value being used for calculating an attribute information itemof the first three-dimensional point; selecting one prediction mode fromthe two or more prediction modes; calculating a prediction residualwhich is a difference between the attribute information item of thefirst three-dimensional point and the predicted value of the oneprediction mode selected; and generating a bitstream including the oneprediction mode and the prediction residual.

For example, when the total number of prediction modes is five, and thenumber of peripheral three-dimensional points is two, an average valueof the attribute information on the peripheral three-dimensional pointsand the attribute values of the items two peripheral three-dimensionalpoints are assigned to three prediction modes. In this case, nopredicted value is assigned to two prediction modes.

When there is a prediction mode to which no predicted value is assigned,for example, if the three-dimensional data encoding device and thethree-dimensional data decoding device assign different predicted valuesto the prediction mode, the three-dimensional data decoding devicecannot accurately decode the attribute information items of the encodedthree-dimensional data. To avoid this, a new predicted value is assignedto the prediction mode to which no predicted value is assigned. Here, asthe new predicted value, a predicted value that can be used forprediction of the attribute information item on the currentthree-dimensional point to be encoded (the median value, the averagevalue or the like of the values of the attribute information items on(the attribute values of) the peripheral three-dimensional points, forexample) is used.

In this way, the attribute information item on the currentthree-dimensional point to be encoded can be encoded by including thenew predicted value in the predicted value candidates. Therefore, theencoding efficiency can be improved. That is, according to thethree-dimensional data encoding method, the code amount can be reduced.

Furthermore, for example, in the calculating of the new predicted valueas the predicted value, a median of values indicated by the attributeinformation items of the one or more second three-dimensional points iscalculated as the new predicted value.

Furthermore, for example, in the calculating of the new predicted valueas the predicted value, a maximum value among values indicated by theattribute information items of the one or more second three-dimensionalpoints is calculated as the new predicted value.

In these cases, since the median value or maximum value, which is likelyto be adopted as a predicted value, is included in the predicted valuesas a new predicted value, the encoding efficiency can be more easilyimproved.

Furthermore, for example, three-dimensional data encoding methodaccording to the present disclosure further includes: determiningwhether a prediction mode to which a predicted value is not assigned ispresent among the two or more prediction modes, before the calculatingof the new predicted value as the predicted value. Here, when aprediction mode to which a predicted value is not assigned is present,the new predicted value is calculated as the predicted value, and thepredicted value is assigned to the prediction mode to which a predictedvalue is not assigned.

For example, a predetermined predicted value is assigned to eachprediction mode. Here, depending on the number of the secondthree-dimensional points located in the periphery of the firstthree-dimensional point, all the prediction modes may not be assignedwith a predetermined predicted value. That is, there may be a predictionmode to which no predicted value is assigned. To cope with this, it isdetermined whether there is a prediction mode to which no predictedvalue is assigned, and if there is a prediction mode to which nopredicted value is assigned, a process of calculating a new predictedvalue and assigning the new predicted value to the prediction mode towhich no predicted value is assigned is performed.

Thus, if there is a prediction mode to which no predicted value isassigned, the process of calculating a new predicted value and assigningthe new predicted value to the prediction mode is performed, and ifthere is no such prediction mode, the process of calculating andassigning a new predicted value is not performed. Therefore, theprocessing amount can be reduced, and at the same time, the encodingefficiency can be improved.

Furthermore, a three-dimensional data decoding method according to anaspect of the present disclosure is a three-dimensional data decodingmethod of decoding encoded three-dimensional points, and includes:selecting one prediction mode from two or more prediction modes includedin a bitstream; calculating a new predicted value as a predicted value,using attribute information items of one or more secondthree-dimensional points neighboring a first three-dimensional point,the new predicted value being used for calculating an attributeinformation item of the first three-dimensional point corresponding tothe one prediction mode selected; and calculating the attributeinformation item of the first three-dimensional point using thepredicted value calculated.

Therefore, the same new predicted value as the new predicted valueassigned by the three-dimensional data encoding device can be calculatedand assigned to the prediction mode, and the bitstream of the encodedattribute information item can be appropriately decoded.

Furthermore, for example, in the calculating of the new predicted valueas the predicted value, a median of values indicated by the attributeinformation items of the one or more second three-dimensional points iscalculated as the new predicted value.

Furthermore, for example, in the calculating of the new predicted valueas the predicted value, a maximum value among values indicated by theattribute information items of the one or more second three-dimensionalpoints is calculated as the new predicted value.

In these cases, even when the median value or maximum value, which islikely to be adopted as a predicted value, is included in the predictedvalues as a new predicted value, the decoding can be appropriatelyperformed.

Furthermore, for example, the three-dimensional data decoding methodaccording to the present disclosure further includes: determiningwhether a prediction mode to which a predicted value is not assigned ispresent among the two or more prediction modes, before the calculatingof the new predicted value as the predicted value. Here, when aprediction mode to which a predicted value is not assigned is present,the calculating of the new predicted value as the predicted value isperformed.

Thus, if there is a prediction mode to which no predicted value isassigned, the process of calculating a new predicted value and assigningthe new predicted value to the prediction mode is performed, and ifthere is no such prediction mode, the process of calculating andassigning a new predicted value is not performed. Therefore, theprocessing amount can be reduced, and at the same time, an appropriatelyencoded attribute information item can be decoded.

Furthermore, for example, a three-dimensional data encoding deviceaccording to an aspect of the present disclosure is a three-dimensionaldata encoding device that encodes three-dimensional points, andincludes: a processor; and memory. Using the memory, the processor:calculates a new predicted value as a predicted value, using attributeinformation items of one or more second three-dimensional pointsneighboring a first three-dimensional point, and assigns the predictedvalue to at least one prediction mode among two or more predictionmodes, the new predicted value being used for calculating an attributeinformation item of the first three-dimensional point; selects oneprediction mode from the two or more prediction modes; calculates aprediction residual which is a difference between the attributeinformation item of the first three-dimensional point and the predictedvalue of the one prediction mode selected; and generates a bitstreamincluding the one prediction mode and the prediction residual.

In this way, the three-dimensional data encoding device can encode theattribute information item on the current three-dimensional point to beencoded, by including the new predicted value in the predicted valuecandidates. Therefore, the three-dimensional data encoding device canimprove the encoding efficiency. That is, the three-dimensional dataencoding device can reduce the code amount.

Furthermore, a three-dimensional data decoding device according to anaspect of the present disclosure is a three-dimensional data decodingdevice that decodes encoded three-dimensional points, and includes: aprocessor; and memory. Using the memory, the processor: selects oneprediction mode from two or more prediction modes included in abitstream; calculates a new predicted value as a predicted value, usingattribute information items of one or more second three-dimensionalpoints neighboring a first three-dimensional point, the new predictedvalue being used for calculating an attribute information item of thefirst three-dimensional point corresponding to the one prediction modeselected; and calculates the attribute information item of the firstthree-dimensional point using the predicted value calculated.

Therefore, the three-dimensional data decoding device can calculate andassign the same new predicted value as the new predicted value assignedby the three-dimensional data encoding device to the prediction mode,and appropriately decode the bitstream of the encoded attributeinformation item.

It is to be noted that these general or specific aspects may beimplemented as a system, a method, an integrated circuit, a computerprogram, or a computer-readable recording medium such as a CD-ROM, ormay be implemented as any optional combination of a system, a method, anintegrated circuit, a computer program, and a recording medium.

Hereinafter, exemplary embodiments will be described in detail withreference to the drawings. Note that the embodiments described beloweach show a specific example of the present disclosure. The numericalvalues, shapes, materials, elements, the arrangement and connection ofthe elements, steps, order of the steps, etc. indicated in the followingembodiments are mere examples, and therefore are not intended to limitthe scope of the present disclosure. Therefore, among elements in thefollowing embodiments, those not recited in any one of the broadest,independent claims are described as optional elements.

Embodiment 1

First, the data structure of encoded three-dimensional data (hereinafteralso referred to as encoded data) according to the present embodimentwill be described. FIG. 1 is a diagram showing the structure of encodedthree-dimensional data according to the present embodiment.

In the present embodiment, a three-dimensional space is divided intospaces (SPCs), which correspond to pictures in moving picture encoding,and the three-dimensional data is encoded on a SPC-by-SPC basis. EachSPC is further divided into volumes (VLMs), which correspond tomacroblocks, etc. in moving picture encoding, and predictions andtransforms are performed on a VLM-by-VLM basis. Each volume includes aplurality of voxels (VXLs), each being a minimum unit in which positioncoordinates are associated. Note that prediction is a process ofgenerating predictive three-dimensional data analogous to a currentprocessing unit by referring to another processing unit, and encoding adifferential between the predictive three-dimensional data and thecurrent processing unit, as in the case of predictions performed ontwo-dimensional images. Such prediction includes not only spatialprediction in which another prediction unit corresponding to the sametime is referred to, but also temporal prediction in which a predictionunit corresponding to a different time is referred to.

When encoding a three-dimensional space represented by point cloud datasuch as a point cloud, for example, the three-dimensional data encodingdevice (hereinafter also referred to as the encoding device) encodes thepoints in the point cloud or points included in the respective voxels ina collective manner, in accordance with a voxel size. Finer voxelsenable a highly-precise representation of the three-dimensional shape ofa point cloud, while larger voxels enable a rough representation of thethree-dimensional shape of a point cloud.

Note that the following describes the case where three-dimensional datais a point cloud, but three-dimensional data is not limited to a pointcloud, and thus three-dimensional data of any format may be employed.

Also note that voxels with a hierarchical structure may be used. In sucha case, when the hierarchy includes n levels, whether a sampling pointis included in the n−1th level or lower levels (levels below the n-thlevel) may be sequentially indicated. For example, when only the n-thlevel is decoded, and the n−1th level or lower levels include a samplingpoint, the n-th level can be decoded on the assumption that a samplingpoint is included at the center of a voxel in the n-th level.

Also, the encoding device obtains point cloud data, using, for example,a distance sensor, a stereo camera, a monocular camera, a gyroscopesensor, or an inertial sensor.

As in the case of moving picture encoding, each SPC is classified intoone of at least the three prediction structures that include: intra SPC(I-SPC), which is individually decodable; predictive SPC (P-SPC) capableof only a unidirectional reference; and bidirectional SPC (B-SPC)capable of bidirectional references. Each SPC includes two types of timeinformation: decoding time and display time.

Furthermore, as shown in FIG. 1, a processing unit that includes aplurality of SPCs is a group of spaces (GOS), which is a random accessunit. Also, a processing unit that includes a plurality of GOSs is aworld (WLD).

The spatial region occupied by each world is associated with an absoluteposition on earth, by use of, for example, GPS, or latitude andlongitude information. Such position information is stored asmeta-information. Note that meta-information may be included in encodeddata, or may be transmitted separately from the encoded data.

Also, inside a GOS, all SPCs may be three-dimensionally adjacent to oneanother, or there may be a SPC that is not three-dimensionally adjacentto another SPC.

Note that the following also describes processes such as encoding,decoding, and reference to be performed on three-dimensional dataincluded in processing units such as GOS, SPC, and VLM, simply asperforming encoding/to encode, decoding/to decode, referring to, etc. ona processing unit. Also note that three-dimensional data included in aprocessing unit includes, for example, at least one pair of a spatialposition such as three-dimensional coordinates and an attribute valuesuch as color information.

Next, the prediction structures among SPCs in a GOS will be described. Aplurality of SPCs in the same GOS or a plurality of VLMs in the same SPCoccupy mutually different spaces, while having the same time information(the decoding time and the display time).

A SPC in a GOS that comes first in the decoding order is an I-SPC. GOSscome in two types: closed GOS and open GOS. A closed GOS is a GOS inwhich all SPCs in the GOS are decodable when decoding starts from thefirst I-SPC. Meanwhile, an open GOS is a GOS in which a different GOS isreferred to in one or more SPCs preceding the first I-SPC in the GOS inthe display time, and thus cannot be singly decoded.

Note that in the case of encoded data of map information, for example, aWLD is sometimes decoded in the backward direction, which is opposite tothe encoding order, and thus backward reproduction is difficult whenGOSs are interdependent. In such a case, a closed GOS is basically used.

Each GOS has a layer structure in height direction, and SPCs aresequentially encoded or decoded from SPCs in the bottom layer.

FIG. 2 is a diagram showing an example of prediction structures amongSPCs that belong to the lowermost layer in a GOS. FIG. 3 is a diagramshowing an example of prediction structures among layers.

A GOS includes at least one I-SPC. Of the objects in a three-dimensionalspace, such as a person, an animal, a car, a bicycle, a signal, and abuilding serving as a landmark, a small-sized object is especiallyeffective when encoded as an I-SPC. When decoding a GOS at a lowthroughput or at a high speed, for example, the three-dimensional datadecoding device (hereinafter also referred to as the decoding device)decodes only I-SPC(s) in the GOS.

The encoding device may also change the encoding interval or theappearance frequency of I-SPCs, depending on the degree of sparsenessand denseness of the objects in a WLD.

In the structure shown in FIG. 3, the encoding device or the decodingdevice encodes or decodes a plurality of layers sequentially from thebottom layer (layer 1). This increases the priority of data on theground and its vicinity, which involve a larger amount of information,when, for example, a self-driving car is concerned.

Regarding encoded data used for a drone, for example, encoding ordecoding may be performed sequentially from SPCs in the top layer in aGOS in height direction.

The encoding device or the decoding device may also encode or decode aplurality of layers in a manner that the decoding device can have arough grasp of a GOS first, and then the resolution is graduallyincreased. The encoding device or the decoding device may performencoding or decoding in the order of layers 3, 8, 1, 9 . . . , forexample.

Next, the handling of static objects and dynamic objects will bedescribed.

A three-dimensional space includes scenes or still objects such as abuilding and a road (hereinafter collectively referred to as staticobjects), and objects with motion such as a car and a person(hereinafter collectively referred to as dynamic objects). Objectdetection is separately performed by, for example, extracting keypointsfrom point cloud data, or from video of a camera such as a stereocamera. In this description, an example method of encoding a dynamicobject will be described.

A first method is a method in which a static object and a dynamic objectare encoded without distinction. A second method is a method in which adistinction is made between a static object and a dynamic object on thebasis of identification information.

For example, a GOS is used as an identification unit. In such a case, adistinction is made between a GOS that includes SPCs constituting astatic object and a GOS that includes SPCs constituting a dynamicobject, on the basis of identification information stored in the encodeddata or stored separately from the encoded data.

Alternatively, a SPC may be used as an identification unit. In such acase, a distinction is made between a SPC that includes VLMsconstituting a static object and a SPC that includes VLMs constituting adynamic object, on the basis of the identification information thusdescribed.

Alternatively, a VLM or a VXL may be used as an identification unit. Insuch a case, a distinction is made between a VLM or a VXL that includesa static object and a VLM or a VXL that includes a dynamic object, onthe basis of the identification information thus described.

The encoding device may also encode a dynamic object as at least one VLMor SPC, and may encode a VLM or a SPC including a static object and aSPC including a dynamic object as mutually different GOSs. When the GOSsize is variable depending on the size of a dynamic object, the encodingdevice separately stores the GOS size as meta-information.

The encoding device may also encode a static object and a dynamic objectseparately from each other, and may superimpose the dynamic object ontoa world constituted by static objects. In such a case, the dynamicobject is constituted by at least one SPC, and each SPC is associatedwith at least one SPC constituting the static object onto which the eachSPC is to be superimposed. Note that a dynamic object may be representednot by SPC(s) but by at least one VLM or VXL.

The encoding device may also encode a static object and a dynamic objectas mutually different streams.

The encoding device may also generate a GOS that includes at least oneSPC constituting a dynamic object. The encoding device may further setthe size of a GOS including a dynamic object (GOS_M) and the size of aGOS including a static object corresponding to the spatial region ofGOS_M at the same size (such that the same spatial region is occupied).This enables superimposition to be performed on a GOS-by-GOS basis.

SPC(s) included in another encoded GOS may be referred to in a P-SPC ora B-SPC constituting a dynamic object. In the case where the position ofa dynamic object temporally changes, and the same dynamic object isencoded as an object in a GOS corresponding to a different time,referring to SPC(s) across GOSs is effective in terms of compressionrate.

The first method and the second method may be selected in accordancewith the intended use of encoded data. When encoded three-dimensionaldata is used as a map, for example, a dynamic object is desired to beseparated, and thus the encoding device uses the second method.Meanwhile, the encoding device uses the first method when the separationof a dynamic object is not required such as in the case wherethree-dimensional data of an event such as a concert and a sports eventis encoded.

The decoding time and the display time of a GOS or a SPC are storable inencoded data or as meta-information. All static objects may have thesame time information. In such a case, the decoding device may determinethe actual decoding time and display time. Alternatively a differentvalue may be assigned to each GOS or SPC as the decoding time, and thesame value may be assigned as the display time. Furthermore, as in thecase of the decoder model in moving picture encoding such asHypothetical Reference Decoder (HRD) compliant with HEVC, a model may beemployed that ensures that a decoder can perform decoding without failby having a buffer of a predetermined size and by reading a bitstream ata predetermined bit rate in accordance with the decoding times.

Next, the topology of GOSs in a world will be described. The coordinatesof the three-dimensional space in a world are represented by the threecoordinate axes (x axis, y axis, and z axis) that are orthogonal to oneanother. A predetermined rule set for the encoding order of GOSs enablesencoding to be performed such that spatially adjacent GOSs arecontiguous in the encoded data. In an example shown in FIG. 4, forexample, GOSs in the x and z planes are successively encoded. After thecompletion of encoding all GOSs in certain x and z planes, the value ofthe y axis is updated. Stated differently, the world expands in the yaxis direction as the encoding progresses. The GOS index numbers are setin accordance with the encoding order.

Here, the three-dimensional spaces in the respective worlds arepreviously associated one-to-one with absolute geographical coordinatessuch as GPS coordinates or latitude/longitude coordinates.Alternatively, each three-dimensional space may be represented as aposition relative to a previously set reference position. The directionsof the x axis, the y axis, and the z axis in the three-dimensional spaceare represented by directional vectors that are determined on the basisof the latitudes and the longitudes, etc. Such directional vectors arestored together with the encoded data as meta-information.

GOSs have a fixed size, and the encoding device stores such size asmeta-information. The GOS size may be changed depending on, for example,whether it is an urban area or not, or whether it is inside or outsideof a room. Stated differently, the GOS size may be changed in accordancewith the amount or the attributes of objects with information values.Alternatively, in the same world, the encoding device may adaptivelychange the GOS size or the interval between I-SPCs in GOSs in accordancewith the object density, etc. For example, the encoding device sets theGOS size to smaller and the interval between I-SPCs in GOSs to shorter,as the object density is higher.

In an example shown in FIG. 5, to enable random access with a finergranularity, a GOS with a high object density is partitioned into theregions of the third to tenth GOSs. Note that the seventh to tenth GOSsare located behind the third to sixth GOSs.

Next, the structure and the operation flow of the three-dimensional dataencoding device according to the present embodiment will be described.FIG. 6 is a block diagram of three-dimensional data encoding device 100according to the present embodiment. FIG. 7 is a flowchart of an exampleoperation performed by three-dimensional data encoding device 100.

Three-dimensional data encoding device 100 shown in FIG. 6 encodesthree-dimensional data 111, thereby generating encoded three-dimensionaldata 112. Such three-dimensional data encoding device 100 includesobtainer 101, encoding region determiner 102, divider 103, and encoder104.

As shown in FIG. 7, first, obtainer 101 obtains three-dimensional data111, which is point cloud data (S101).

Next, encoding region determiner 102 determines a current region forencoding from among spatial regions corresponding to the obtained pointcloud data (S102). For example, in accordance with the position of auser or a vehicle, encoding region determiner 102 determines, as thecurrent region, a spatial region around such position.

Next, divider 103 divides the point cloud data included in the currentregion into processing units. The processing units here means units suchas GOSs and SPCs described above. The current region here correspondsto, for example, a world described above. More specifically, divider 103divides the point cloud data into processing units on the basis of apredetermined GOS size, or the presence/absence/size of a dynamic object(S103). Divider 103 further determines the starting position of the SPCthat comes first in the encoding order in each GOS.

Next, encoder 104 sequentially encodes a plurality of SPCs in each GOS,thereby generating encoded three-dimensional data 112 (S104).

Note that although an example is described here in which the currentregion is divided into GOSs and SPCs, after which each GOS is encoded,the processing steps are not limited to this order. For example, stepsmay be employed in which the structure of a single GOS is determined,which is followed by the encoding of such GOS, and then the structure ofthe subsequent GOS is determined.

As thus described, three-dimensional data encoding device 100 encodesthree-dimensional data 111, thereby generating encoded three-dimensionaldata 112. More specifically, three-dimensional data encoding device 100divides three-dimensional data into first processing units (GOSs), eachbeing a random access unit and being associated with three-dimensionalcoordinates, divides each of the first processing units (GOSs) intosecond processing units (SPCs), and divides each of the secondprocessing units (SPCs) into third processing units (VLMs). Each of thethird processing units (VLMs) includes at least one voxel (VXL), whichis the minimum unit in which position information is associated.

Next, three-dimensional data encoding device 100 encodes each of thefirst processing units (GOSs), thereby generating encodedthree-dimensional data 112. More specifically, three-dimensional dataencoding device 100 encodes each of the second processing units (SPCs)in each of the first processing units (GOSs). Three-dimensional dataencoding device 100 further encodes each of the third processing units(VLMs) in each of the second processing units (SPCs).

When a current first processing unit (GOS) is a closed GOS, for example,three-dimensional data encoding device 100 encodes a current secondprocessing unit (SPC) included in such current first processing unit(GOS) by referring to another second processing unit (SPC) included inthe current first processing unit (GOS). Stated differently,three-dimensional data encoding device 100 refers to no secondprocessing unit (SPC) included in a first processing unit (GOS) that isdifferent from the current first processing unit (GOS).

Meanwhile, when a current first processing unit (GOS) is an open GOS,three-dimensional data encoding device 100 encodes a current secondprocessing unit (SPC) included in such current first processing unit(GOS) by referring to another second processing unit (SPC) included inthe current first processing unit (GOS) or a second processing unit(SPC) included in a first processing unit (GOS) that is different fromthe current first processing unit (GOS).

Also, three-dimensional data encoding device 100 selects, as the type ofa current second processing unit (SPC), one of the following: a firsttype (I-SPC) in which another second processing unit (SPC) is notreferred to; a second type (P-SPC) in which another single secondprocessing unit (SPC) is referred to; and a third type in which othertwo second processing units (SPC) are referred to. Three-dimensionaldata encoding device 100 encodes the current second processing unit(SPC) in accordance with the selected type.

Next, the structure and the operation flow of the three-dimensional datadecoding device according to the present embodiment will be described.FIG. 8 is a block diagram of three-dimensional data decoding device 200according to the present embodiment. FIG. 9 is a flowchart of an exampleoperation performed by three-dimensional data decoding device 200.

Three-dimensional data decoding device 200 shown in FIG. 8 decodesencoded three-dimensional data 211, thereby generating decodedthree-dimensional data 212. Encoded three-dimensional data 211 here is,for example, encoded three-dimensional data 112 generated bythree-dimensional data encoding device 100. Such three-dimensional datadecoding device 200 includes obtainer 201, decoding start GOS determiner202, decoding SPC determiner 203, and decoder 204.

First, obtainer 201 obtains encoded three-dimensional data 211 (201).Next, decoding start GOS determiner 202 determines a current GOS fordecoding (S202). More specifically, decoding start GOS determiner 202refers to meta-information stored in encoded three-dimensional data 211or stored separately from the encoded three-dimensional data todetermine, as the current GOS, a GOS that includes a SPC correspondingto the spatial position, the object, or the time from which decoding isto start.

Next, decoding SPC determiner 203 determines the type(s) (I, P, and/orB) of SPCs to be decoded in the GOS (S203). For example, decoding SPCdeterminer 203 determines whether to (1) decode only I-SPC(s), (2) todecode I-SPC(s) and P-SPCs, or (3) to decode SPCs of all types. Notethat the present step may not be performed, when the type(s) of SPCs tobe decoded are previously determined such as when all SPCs arepreviously determined to be decoded.

Next, decoder 204 obtains an address location within encodedthree-dimensional data 211 from which a SPC that comes first in the GOSin the decoding order (the same as the encoding order) starts. Decoder204 obtains the encoded data of the first SPC from the address location,and sequentially decodes the SPCs from such first SPC (S204). Note thatthe address location is stored in the meta-information, etc.

Three-dimensional data decoding device 200 decodes decodedthree-dimensional data 212 as thus described. More specifically,three-dimensional data decoding device 200 decodes each encodedthree-dimensional data 211 of the first processing units (GOSs), eachbeing a random access unit and being associated with three-dimensionalcoordinates, thereby generating decoded three-dimensional data 212 ofthe first processing units (GOSs). Even more specifically,three-dimensional data decoding device 200 decodes each of the secondprocessing units (SPCs) in each of the first processing units (GOSs).Three-dimensional data decoding device 200 further decodes each of thethird processing units (VLMs) in each of the second processing units(SPCs).

The following describes meta-information for random access. Suchmeta-information is generated by three-dimensional data encoding device100, and included in encoded three-dimensional data 112 (211).

In the conventional random access for a two-dimensional moving picture,decoding starts from the first frame in a random access unit that isclose to a specified time. Meanwhile, in addition to times, randomaccess to spaces (coordinates, objects, etc.) is assumed to be performedin a world.

To enable random access to at least three elements of coordinates,objects, and times, tables are prepared that associate the respectiveelements with the GOS index numbers. Furthermore, the OS index numbersare associated with the addresses of the respective first I-SPCs in theGOSs. FIG. 10 is a diagram showing example tables included in themeta-information. Note that not all the tables shown in FIG. 10 arerequired to be used, and thus at least one of the tables is used.

The following describes an example in which random access is performedfrom coordinates as a starting point. To access the coordinates (x2, y2,and z2), the coordinates-GOS table is first referred to, which indicatesthat the point corresponding to the coordinates (x2, y2, and z2) isincluded in the second GOS. Next, the GOS-address table is referred to,which indicates that the address of the first I-SPC in the second GOS isaddr(2). As such, decoder 204 obtains data from this address to startdecoding.

Note that the addresses may either be logical addresses or physicaladdresses of an HDD or a memory. Alternatively, information thatidentifies file segments may be used instead of addresses. File segmentsare, for example, units obtained by segmenting at least one GOS, etc.

When an object spans across a plurality of GOSs, the object-GOS tablemay show a plurality of GOSs to which such object belongs. When suchplurality of GOSs are closed GOSs, the encoding device and the decodingdevice can perform encoding or decoding in parallel. Meanwhile, whensuch plurality of GOSs are open GOSs, a higher compression efficiency isachieved by the plurality of GOSs referring to each other.

Example objects include a person, an animal, a car, a bicycle, a signal,and a building serving as a landmark. For example, three-dimensionaldata encoding device 100 extracts keypoints specific to an object from athree-dimensional point cloud, etc., when encoding a world, and detectsthe object on the basis of such keypoints to set the detected object asa random access point.

As thus described, three-dimensional data encoding device 100 generatesfirst information indicating a plurality of first processing units(GOSs) and the three-dimensional coordinates associated with therespective first processing units (GOSs). Encoded three-dimensional data112 (211) includes such first information. The first information furtherindicates at least one of objects, times, and data storage locationsthat are associated with the respective first processing units (GOSs).

Three-dimensional data decoding device 200 obtains the first informationfrom encoded three-dimensional data 211. Using such first information,three-dimensional data decoding device 200 identifies encodedthree-dimensional data 211 of the first processing unit that correspondsto the specified three-dimensional coordinates, object, or time, anddecodes encoded three-dimensional data 211.

The following describes an example of other meta-information. Inaddition to the meta-information for random access, three-dimensionaldata encoding device 100 may also generate and store meta-information asdescribed below, and three-dimensional data decoding device 200 may usesuch meta-information at the time of decoding.

When three-dimensional data is used as map information, for example, aprofile is defined in accordance with the intended use, and informationindicating such profile may be included in meta-information. Forexample, a profile is defined for an urban or a suburban area, or for aflying object, and the maximum or minimum size, etc. of a world, a SPCor a VLM, etc. is defined in each profile. For example, more detailedinformation is required for an urban area than for a suburban area, andthus the minimum VLM size is set to small.

The meta-information may include tag values indicating object types.Each of such tag values is associated with VLMs, SPCs, or GOSs thatconstitute an object. For example, a tag value may be set for eachobject type in a manner, for example, that the tag value “0” indicates“person,” the tag value “1” indicates “car,” and the tag value “2”indicates “signal”. Alternatively, when an object type is hard to judge,or such judgment is not required, a tag value may be used that indicatesthe size or the attribute indicating, for example, whether an object isa dynamic object or a static object.

The meta-information may also include information indicating a range ofthe spatial region occupied by a world.

The meta-information may also store the SPC or VXL size as headerinformation common to the whole stream of the encoded data or to aplurality of SPCs, such as SPCs in a GOS.

The meta-information may also include identification information on adistance sensor or a camera that has been used to generate a pointcloud, or information indicating the positional accuracy of a pointcloud in the point cloud.

The meta-information may also include information indicating whether aworld is made only of static objects or includes a dynamic object.

The following describes variations of the present embodiment.

The encoding device or the decoding device may encode or decode two ormore mutually different SPCs or GOSs in parallel. GOSs to be encoded ordecoded in parallel can be determined on the basis of meta-information,etc. indicating the spatial positions of the GOSs.

When three-dimensional data is used as a spatial map for use by a car ora flying object, etc. in traveling, or for creation of such a spatialmap, for example, the encoding device or the decoding device may encodeor decode GOSs or SPCs included in a space that is identified on thebasis of GPS information, the route information, the zoom magnification,etc.

The decoding device may also start decoding sequentially from a spacethat is close to the self-location or the traveling route. The encodingdevice or the decoding device may give a lower priority to a spacedistant from the self-location or the traveling route than the priorityof a nearby space to encode or decode such distant place. To “give alower priority” means here, for example, to lower the priority in theprocessing sequence, to decrease the resolution (to apply decimation inthe processing), or to lower the image quality (to increase the encodingefficiency by for example, setting the quantization step to larger).

When decoding encoded data that is hierarchically encoded in a space,the decoding device may decode only the bottom layer in the hierarchy.

The decoding device may also start decoding preferentially from thebottom layer of the hierarchy in accordance with the zoom magnificationor the intended use of the map.

For self-location estimation or object recognition, etc. involved in theself-driving of a car or a robot, the encoding device or the decodingdevice may encode or decode regions at a lower resolution, except for aregion that is lower than or at a specified height from the ground (theregion to be recognized).

The encoding device may also encode point clouds representing thespatial shapes of a room interior and a room exterior separately. Forexample, the separation of a GOS representing a room interior (interiorGOS) and a GOS representing a room exterior (exterior GOS) enables thedecoding device to select a GOS to be decoded in accordance with aviewpoint location, when using the encoded data.

The encoding device may also encode an interior GOS and an exterior GOShaving close coordinates so that such GOSs come adjacent to each otherin an encoded stream. For example, the encoding device associates theidentifiers of such GOSs with each other, and stores informationindicating the associated identifiers into the meta-information that isstored in the encoded stream or stored separately. This enables thedecoding device to refer to the information in the meta-information toidentify an interior GOS and an exterior GOS having close coordinates.

The encoding device may also change the GOS size or the SPC sizedepending on whether a GOS is an interior GOS or an exterior GOS. Forexample, the encoding device sets the size of an interior GOS to smallerthan the size of an exterior GOS. The encoding device may also changethe accuracy of extracting keypoints from a point cloud, or the accuracyof detecting objects, for example, depending on whether a GOS is aninterior GOS or an exterior GOS.

The encoding device may also add, to encoded data, information by whichthe decoding device displays objects with a distinction between adynamic object and a static object. This enables the decoding device todisplay a dynamic object together with, for example, a red box orletters for explanation. Note that the decoding device may display onlya red box or letters for explanation, instead of a dynamic object. Thedecoding device may also display more particular object types. Forexample, a red box may be used for a car, and a yellow box may be usedfor a person.

The encoding device or the decoding device may also determine whether toencode or decode a dynamic object and a static object as a different SPCor GOS, in accordance with, for example, the appearance frequency ofdynamic objects or a ratio between static objects and dynamic objects.For example, when the appearance frequency or the ratio of dynamicobjects exceeds a threshold, a SPC or a GOS including a mixture of adynamic object and a static object is accepted, while when theappearance frequency or the ratio of dynamic objects is below athreshold, a SPC or GOS including a mixture of a dynamic object and astatic object is unaccepted.

When detecting a dynamic object not from a point cloud but fromtwo-dimensional image information of a camera, the encoding device mayseparately obtain information for identifying a detection result (box orletters) and the object position, and encode these items of informationas part of the encoded three-dimensional data. In such a case, thedecoding device superimposes auxiliary information (box or letters)indicating the dynamic object onto a resultant of decoding a staticobject to display it.

The encoding device may also change the sparseness and denseness of VXLsor VLMs in a SPC in accordance with the degree of complexity of theshape of a static object. For example, the encoding device sets VXLs orVLMs at a higher density as the shape of a static object is morecomplex. The encoding device may further determine a quantization step,etc. for quantizing spatial positions or color information in accordancewith the sparseness and denseness of VXLs or VLMs. For example, theencoding device sets the quantization step to smaller as the density ofVXLs or VLMs is higher.

As described above, the encoding device or the decoding device accordingto the present embodiment encodes or decodes a space on a SPC-by-SPCbasis that includes coordinate information.

Furthermore, the encoding device and the decoding device performencoding or decoding on a volume-by-volume basis in a SPC. Each volumeincludes a voxel, which is the minimum unit in which positioninformation is associated.

Also, using a table that associates the respective elements of spatialinformation including coordinates, objects, and times with GOSs or usinga table that associates these elements with each other, the encodingdevice and the decoding device associate any ones of the elements witheach other to perform encoding or decoding. The decoding device uses thevalues of the selected elements to determine the coordinates, andidentifies a volume, a voxel, or a SPC from such coordinates to decode aSPC including such volume or voxel, or the identified SPC.

Furthermore, the encoding device determines a volume, a voxel, or a SPCthat is selectable in accordance with the elements, through extractionof keypoints and object recognition, and encodes the determined volume,voxel, or SPC, as a volume, a voxel, or a SPC to which random access ispossible.

SPCs are classified into three types: I-SPC that is singly encodable ordecodable; P-SPC that is encoded or decoded by referring to any one ofthe processed SPCs; and B-SPC that is encoded or decoded by referring toany two of the processed SPCs.

At least one volume corresponds to a static object or a dynamic object.A SPC including a static object and a SPC including a dynamic object areencoded or decoded as mutually different GOSs. Stated differently, a SPCincluding a static object and a SPC including a dynamic object areassigned to different GOSs.

Dynamic objects are encoded or decoded on an object-by-object basis, andare associated with at least one SPC including a static object. Stateddifferently, a plurality of dynamic objects are individually encoded,and the obtained encoded data of the dynamic objects is associated witha SPC including a static object.

The encoding device and the decoding device give an increased priorityto I-SPC(s) in a GOS to perform encoding or decoding. For example, theencoding device performs encoding in a manner that prevents thedegradation of I-SPCs (in a manner that enables the originalthree-dimensional data to be reproduced with a higher fidelity afterdecoded). The decoding device decodes, for example, only I-SPCs.

The encoding device may change the frequency of using I-SPCs dependingon the sparseness and denseness or the number (amount) of the objects ina world to perform encoding. Stated differently, the encoding devicechanges the frequency of selecting I-SPCs depending on the number or thesparseness and denseness of the objects included in thethree-dimensional data. For example, the encoding device uses I-SPCs ata higher frequency as the density of the objects in a world is higher.

The encoding device also sets random access points on a GOS-by-GOSbasis, and stores information indicating the spatial regionscorresponding to the GOSs into the header information.

The encoding device uses, for example, a default value as the spatialsize of a GOS. Note that the encoding device may change the GOS sizedepending on the number (amount) or the sparseness and denseness ofobjects or dynamic objects. For example, the encoding device sets thespatial size of a GOS to smaller as the density of objects or dynamicobjects is higher or the number of objects or dynamic objects isgreater.

Also, each SPC or volume includes a keypoint group that is derived byuse of information obtained by a sensor such as a depth sensor, agyroscope sensor, or a camera sensor. The coordinates of the keypointsare set at the central positions of the respective voxels. Furthermore,finer voxels enable highly accurate position information.

The keypoint group is derived by use of a plurality of pictures. Aplurality of pictures include at least two types of time information:the actual time information and the same time information common to aplurality of pictures that are associated with SPCs (for example, theencoding time used for rate control, etc.).

Also, encoding or decoding is performed on a GOS-by-GOS basis thatincludes at least one SPC.

The encoding device and the decoding device predict P-SPCs or B-SPCs ina current GOS by referring to SPCs in a processed GOS.

Alternatively, the encoding device and the decoding device predictP-SPCs or B-SPCs in a current GOS, using the processed SPCs in thecurrent GOS, without referring to a different GOS.

Furthermore, the encoding device and the decoding device transmit orreceive an encoded stream on a world-by-world basis that includes atleast one GOS.

Also, a GOS has a layer structure in one direction at least in a world,and the encoding device and the decoding device start encoding ordecoding from the bottom layer. For example, a random accessible GOSbelongs to the lowermost layer. A GOS that belongs to the same layer ora lower layer is referred to in a GOS that belongs to an upper layer.Stated differently a GOS is spatially divided in a predetermineddirection in advance to have a plurality of layers, each including atleast one SPC. The encoding device and the decoding device encode ordecode each SPC by referring to a SPC included in the same layer as theeach SPC or a SPC included in a layer lower than that of the each SPC.

Also, the encoding device and the decoding device successively encode ordecode GOSs on a world-by-world basis that includes such GOSs. In sodoing, the encoding device and the decoding device write or read outinformation indicating the order (direction) of encoding or decoding asmetadata. Stated differently, the encoded data includes informationindicating the order of encoding a plurality of GOSs.

The encoding device and the decoding device also encode or decodemutually different two or more SPCs or GOSs in parallel.

Furthermore, the encoding device and the decoding device encode ordecode the spatial information (coordinates, size, etc.) on a SPC or aGOS.

The encoding device and the decoding device encode or decode SPCs orGOSs included in an identified space that is identified on the basis ofexternal information on the self-location or/and region size, such asGPS information, route information, or magnification.

The encoding device or the decoding device gives a lower priority to aspace distant from the self-location than the priority of a nearby spaceto perform encoding or decoding.

The encoding device sets a direction at one of the directions in aworld, in accordance with the magnification or the intended use, toencode a OS having a layer structure in such direction. Also, thedecoding device decodes a GOS having a layer structure in one of thedirections in a world that has been set in accordance with themagnification or the intended use, preferentially from the bottom layer.

The encoding device changes the accuracy of extracting keypoints, theaccuracy of recognizing objects, or the size of spatial regions, etc.included in a SPC, depending on whether an object is an interior objector an exterior object. Note that the encoding device and the decodingdevice encode or decode an interior GOS and an exterior GOS having closecoordinates in a manner that these GOSs come adjacent to each other in aworld, and associate their identifiers with each other for encoding anddecoding.

Embodiment 2

When using encoded data of a point cloud in an actual device or service,it is desirable that necessary information be transmitted/received inaccordance with the intended use to reduce the network bandwidth.However, there has been no such functionality in the structure ofencoding three-dimensional data, nor an encoding method therefor.

The present embodiment describes a three-dimensional data encodingmethod and a three-dimensional data encoding device for providing thefunctionality of transmitting/receiving only necessary information inencoded data of a three-dimensional point cloud in accordance with theintended use, as well as a three-dimensional data decoding method and athree-dimensional data decoding device for decoding such encoded data.

A voxel (VXL) with a feature greater than or equal to a given amount isdefined as a feature voxel (FVXL), and a world (WLD) constituted byFVXLs is defined as a sparse world (SWLD). FIG. 11 is a diagram showingexample structures of a sparse world and a world. A SWLD includes:FGOSs, each being a GOS constituted by FVXLs; FSPCs, each being a SPCconstituted by FVXLs; and FVLMs, each being a VLM constituted by FVXLs.The data structure and prediction structure of a FGOS, a FSPC, and aFVLM may be the same as those of a GOS, a SPC, and a VLM.

A feature represents the three-dimensional position information on a VXLor the visible-light information on the position of a VXL. A largenumber of features are detected especially at a corner, an edge, etc. ofa three-dimensional object. More specifically such a feature is athree-dimensional feature or a visible-light feature as described below,but may be any feature that represents the position, luminance, or colorinformation, etc. on a VXL.

Used as three-dimensional features are signature of histograms oforientations (SHOT) features, point feature histograms (PFH) features,or point pair feature (PPF) features.

SHOT features are obtained by dividing the periphery of a VXL, andcalculating an inner product of the reference point and the normalvector of each divided region to represent the calculation result as ahistogram. SHOT features are characterized by a large number ofdimensions and high-level feature representation.

PFH features are obtained by selecting a large number of two point pairsin the vicinity of a VXL, and calculating the normal vector, etc. fromeach two point pair to represent the calculation result as a histogram.PFH features are histogram features, and thus are characterized byrobustness against a certain extent of disturbance and also high-levelfeature representation.

PPF features are obtained by using a normal vector, etc. for each twopoints of VXLs. PPF features, for which all VXLs are used, hasrobustness against occlusion.

Used as visible-light features are scale-invariant feature transform(SIFT), speeded up robust features (SURF), or histogram of orientedgradients (HOG), etc. that use information on an image such as luminancegradient information.

A SWLD is generated by calculating the above-described features of therespective VXLs in a WLD to extract FVXLs. Here, the SWLD may be updatedevery time the WLD is updated, or may be regularly updated after theelapse of a certain period of time, regardless of the timing at whichthe WLD is updated.

A SWLD may be generated for each type of features. For example,different SWLDs may be generated for the respective types of features,such as SWLD1 based on SHOT features and SWLD2 based on SIFT features sothat SWLDs are selectively used in accordance with the intended use.Also, the calculated feature of each FVXL may be held in each FVXL asfeature information.

Next, the usage of a sparse world (SWLD) will be described. A SWLDincludes only feature voxels (FVXLs), and thus its data size is smallerin general than that of a WLD that includes all VXLs.

In an application that utilizes features for a certain purpose, the useof information on a SWLD instead of a WLD reduces the time required toread data from a hard disk, as well as the bandwidth and the timerequired for data transfer over a network. For example, a WLD and a SWLDare held in a server as map information so that map information to besent is selected between the WLD and the SWLD in accordance with arequest from a client. This reduces the network bandwidth and the timerequired for data transfer. More specific examples will be describedbelow.

FIG. 12 and FIG. 13 are diagrams showing usage examples of a SWLD and aWLD. As FIG. 12 shows, when client 1, which is a vehicle-mounted device,requires map information to use it for self-location determination,client 1 sends to a server a request for obtaining map data forself-location estimation (S301). The server sends to client 1 the SWLDin response to the obtainment request (S302). Client 1 uses the receivedSWLD to determine the self-location (S303). In so doing, client 1obtains VXL information on the periphery of client 1 through variousmeans including a distance sensor such as a rangefinder, as well as astereo camera and a combination of a plurality of monocular cameras.Client 1 then estimates the self-location information from the obtainedVXL information and the SWLD. Here, the self-location informationincludes three-dimensional position information, orientation, etc. ofclient 1.

As FIG. 13 shows, when client 2, which is a vehicle-mounted device,requires map information to use it for rendering a map such as athree-dimensional map, client 2 sends to the server a request forobtaining map data for map rendering (S311). The server sends to client2 the WLD in response to the obtainment request (S312). Client 2 usesthe received WLD to render a map (S313). In so doing, client 2 uses, forexample, image client 2 has captured by a visible-light camera, etc. andthe WLD obtained from the server to create a rendering image, andrenders such created image onto a screen of a car navigation system,etc.

As described above, the server sends to a client a SWLD when thefeatures of the respective VXLs are mainly required such as in the caseof self-location estimation, and sends to a client a WLD when detailedVXL information is required such as in the case of map rendering. Thisallows for an efficient sending/receiving of map data.

Note that a client may self-judge which one of a SWLD and a WLD isnecessary, and request the server to send a SWLD or a WLD. Also, theserver may judge which one of a SWLD and a WLD to send in accordancewith the status of the client or a network.

Next, a method will be described of switching the sending/receivingbetween a sparse world (SWLD) and a world (WLD).

Whether to receive a WLD or a SWLD may be switched in accordance withthe network bandwidth. FIG. 14 is a diagram showing an example operationin such case. For example, when a low-speed network is used that limitsthe usable network bandwidth, such as in a Long-Term Evolution (LTE)environment, a client accesses the server over a low-speed network(S321), and obtains the SWLD from the server as map information (S322).Meanwhile, when a high-speed network is used that has an adequatelybroad network bandwidth, such as in a WiFi environment, a clientaccesses the server over a high-speed network (S323), and obtains theWLD from the server (S324). This enables the client to obtainappropriate map information in accordance with the network bandwidthsuch client is using.

More specifically, a client receives the SWLD over an LTE network whenin outdoors, and obtains the WLD over a WiFi network when in indoorssuch as in a facility. This enables the client to obtain more detailedmap information on indoor environment.

As described above, a client may request for a WLD or a SWLD inaccordance with the bandwidth of a network such client is using.Alternatively, the client may send to the server information indicatingthe bandwidth of a network such client is using, and the server may sendto the client data (the WLD or the SWLD) suitable for such client inaccordance with the information. Alternatively, the server may identifythe network bandwidth the client is using, and send to the client data(the WLD or the SWLD) suitable for such client.

Also, whether to receive a WLD or a SWLD may be switched in accordancewith the speed of traveling. FIG. 15 is a diagram showing an exampleoperation in such case. For example, when traveling at a high speed(S331), a client receives the SWLD from the server (S332). Meanwhile,when traveling at a low speed (S333), the client receives the WLD fromthe server (S334). This enables the client to obtain map informationsuitable to the speed, while reducing the network bandwidth. Morespecifically, when traveling on an expressway, the client receives theSWLD with a small data amount, which enables the update of rough mapinformation at an appropriate speed. Meanwhile, when traveling on ageneral road, the client receives the WLD, which enables the obtainmentof more detailed map information.

As described above, the client may request the server for a WLD or aSWLD in accordance with the traveling speed of such client.Alternatively, the client may send to the server information indicatingthe traveling speed of such client, and the server may send to theclient data (the WLD or the SWLD) suitable to such client in accordancewith the information. Alternatively, the server may identify thetraveling speed of the client to send data (the WLD or the SWLD)suitable to such client.

Also, the client may obtain, from the server, a SWLD first, from whichthe client may obtain a WLD of an important region. For example, whenobtaining map information, the client first obtains a SWLD for rough mapinformation, from which the client narrows to a region in which featuressuch as buildings, signals, or persons appear at high frequency so thatthe client can later obtain a WLD of such narrowed region. This enablesthe client to obtain detailed information on a necessary region, whilereducing the amount of data received from the server.

The server may also create from a WLD different SWLDs for the respectiveobjects, and the client may receive SWLDs in accordance with theintended use. This reduces the network bandwidth. For example, theserver recognizes persons or cars in a WLD in advance, and creates aSWLD of persons and a SWLD of cars. The client, when wishing to obtaininformation on persons around the client, receives the SWLD of persons,and when wising to obtain information on cars, receives the SWLD ofcars. Such types of SWLDs may be distinguished by information (flag, ortype, etc.) added to the header, etc.

Next, the structure and the operation flow of the three-dimensional dataencoding device (e.g., a server) according to the present embodimentwill be described. FIG. 16 is a block diagram of three-dimensional dataencoding device 400 according to the present embodiment. FIG. 17 is aflowchart of three-dimensional data encoding processes performed bythree-dimensional data encoding device 400.

Three-dimensional data encoding device 400 shown in FIG. 16 encodesinput three-dimensional data 411, thereby generating encodedthree-dimensional data 413 and encoded three-dimensional data 414, eachbeing an encoded stream. Here, encoded three-dimensional data 413 isencoded three-dimensional data corresponding to a WLD, and encodedthree-dimensional data 414 is encoded three-dimensional datacorresponding to a SWLD. Such three-dimensional data encoding device 400includes, obtainer 401, encoding region determiner 402, SWLD extractor403, WLD encoder 404, and SWLD encoder 405.

First, as FIG. 17 shows, obtainer 401 obtains input three-dimensionaldata 411, which is point cloud data in a three-dimensional space (S401).

Next, encoding region determiner 402 determines a current spatial regionfor encoding on the basis of a spatial region in which the point clouddata is present (S402).

Next, SWLD extractor 403 defines the current spatial region as a WLD,and calculates the feature from each VXL included in the WLD. Then, SWLDextractor 403 extracts VXLs having an amount of features greater than orequal to a predetermined threshold, defines the extracted VXLs as FVXLs,and adds such FVXLs to a SWLD, thereby generating extractedthree-dimensional data 412 (S403). Stated differently, extractedthree-dimensional data 412 having an amount of features greater than orequal to the threshold is extracted from input three-dimensional data411.

Next, WLD encoder 404 encodes input three-dimensional data 411corresponding to the WLD, thereby generating encoded three-dimensionaldata 413 corresponding to the WLD (S404). In so doing, WLD encoder 404adds to the header of encoded three-dimensional data 413 informationthat distinguishes that such encoded three-dimensional data 413 is astream including a WLD.

SWLD encoder 405 encodes extracted three-dimensional data 412corresponding to the SWLD, thereby generating encoded three-dimensionaldata 414 corresponding to the SWLD (S405). In so doing, SWLD encoder 405adds to the header of encoded three-dimensional data 414 informationthat distinguishes that such encoded three-dimensional data 414 is astream including a SWLD.

Note that the process of generating encoded three-dimensional data 413and the process of generating encoded three-dimensional data 414 may beperformed in the reverse order. Also note that a part or all of theseprocesses may be performed in parallel.

A parameter “world_type” is defined, for example, as information addedto each header of encoded three-dimensional data 413 and encodedthree-dimensional data 414. world_type=0 indicates that a streamincludes a WLD, and world_type=1 indicates that a stream includes aSWLD. An increased number of values may be further assigned to define alarger number of types, e.g., world_type=2. Also, one of encodedthree-dimensional data 413 and encoded three-dimensional data 414 mayinclude a specified flag. For example, encoded three-dimensional data414 may be assigned with a flag indicating that such stream includes aSWLD. In such a case, the decoding device can distinguish whether suchstream is a stream including a WLD or a stream including a SWLD inaccordance with the presence/absence of the flag.

Also, an encoding method used by WLD encoder 404 to encode a WLD may bedifferent from an encoding method used by SWLD encoder 405 to encode aSWLD.

For example, data of a SWLD is decimated, and thus can have a lowercorrelation with the neighboring data than that of a WLD. For thisreason, of intra prediction and inter prediction, inter prediction maybe more preferentially performed in an encoding method used for a SWLDthan in an encoding method used for a WLD.

Also, an encoding method used for a SWLD and an encoding method used fora WLD may represent three-dimensional positions differently. Forexample, three-dimensional coordinates may be used to represent thethree-dimensional positions of FVXLs in a SWLD and an octree describedbelow may be used to represent three-dimensional positions in a WLD, andvice versa.

Also, SWLD encoder 405 performs encoding in a manner that encodedthree-dimensional data 414 of a SWLD has a smaller data size than thedata size of encoded three-dimensional data 413 of a WLD. A SWLD canhave a lower inter-data correlation, for example, than that of a WLD asdescribed above. This can lead to a decreased encoding efficiency, andthus to encoded three-dimensional data 414 having a larger data sizethan the data size of encoded three-dimensional data 413 of a WLD. Whenthe data size of the resulting encoded three-dimensional data 414 islarger than the data size of encoded three-dimensional data 413 of aWLD, SWLD encoder 405 performs encoding again to re-generate encodedthree-dimensional data 414 having a reduced data size.

For example, SWLD extractor 403 re-generates extracted three-dimensionaldata 412 having a reduced number of keypoints to be extracted, and SWLDencoder 405 encodes such extracted three-dimensional data 412.Alternatively, SWLD encoder 405 may perform more coarse quantization.More coarse quantization is achieved, for example, by rounding the datain the lowermost level in an octree structure described below.

When failing to decrease the data size of encoded three-dimensional data414 of the SWLD to smaller than the data size of encodedthree-dimensional data 413 of the WLD, SWLD encoder 405 may not generateencoded three-dimensional data 414 of the SWLD. Alternatively encodedthree-dimensional data 413 of the WLD may be copied as encodedthree-dimensional data 414 of the SWLD. Stated differently, encodedthree-dimensional data 413 of the WLD may be used as it is as encodedthree-dimensional data 414 of the SWLD.

Next, the structure and the operation flow of the three-dimensional datadecoding device (e.g., a client) according to the present embodimentwill be described. FIG. 18 is a block diagram of three-dimensional datadecoding device 500 according to the present embodiment. FIG. 19 is aflowchart of three-dimensional data decoding processes performed bythree-dimensional data decoding device 500.

Three-dimensional data decoding device 500 shown in FIG. 18 decodesencoded three-dimensional data 511, thereby generating decodedthree-dimensional data 512 or decoded three-dimensional data 513.Encoded three-dimensional data 511 here is, for example, encodedthree-dimensional data 413 or encoded three-dimensional data 414generated by three-dimensional data encoding device 400.

Such three-dimensional data decoding device 500 includes obtainer 501,header analyzer 502, WLD decoder 503, and SWLD decoder 504.

First, as FIG. 19 shows, obtainer 501 obtains encoded three-dimensionaldata 511 (S501). Next, header analyzer 502 analyzes the header ofencoded three-dimensional data 511 to identify whether encodedthree-dimensional data 511 is a stream including a WLD or a streamincluding a SWLD (S502). For example, the above-described parameterworld_type is referred to in making such identification.

When encoded three-dimensional data 511 is a stream including a WLD (Yesin S503), WLD decoder 503 decodes encoded three-dimensional data 511,thereby generating decoded three-dimensional data 512 of the WLD (S504).Meanwhile, when encoded three-dimensional data 511 is a stream includinga SWLD (No in S503), SWLD decoder 504 decodes encoded three-dimensionaldata 511, thereby generating decoded three-dimensional data 513 of theSWLD (S505).

Also, as in the case of the encoding device, a decoding method used byWLD decoder 503 to decode a WLD may be different from a decoding methodused by SWLD decoder 504 to decode a SWLD. For example, of intraprediction and inter prediction, inter prediction may be morepreferentially performed in a decoding method used for a SWLD than in adecoding method used for a WLD.

Also, a decoding method used for a SWLD and a decoding method used for aWLD may represent three-dimensional positions differently. For example,three-dimensional coordinates may be used to represent thethree-dimensional positions of FVXLs in a SWLD and an octree describedbelow may be used to represent three-dimensional positions in a WLD, andvice versa.

Next, an octree representation will be described, which is a method ofrepresenting three-dimensional positions. VXL data included inthree-dimensional data is converted into an octree structure beforeencoded. FIG. 20 is a diagram showing example VXLs in a WLD. FIG. 21 isa diagram showing an octree structure of the WLD shown in FIG. 20. Anexample shown in FIG. 20 illustrates three VXLs 1 to 3 that includepoint clouds (hereinafter referred to as effective VXLs). As FIG. 21shows, the octree structure is made of nodes and leaves. Each node has amaximum of eight nodes or leaves. Each leaf has VXL information. Here,of the leaves shown in FIG. 21, leaf 1, leaf 2, and leaf 3 representVXL1, VXL2, and VXL3 shown in FIG. 20, respectively.

More specifically, each node and each leaf correspond to athree-dimensional position. Node 1 corresponds to the entire block shownin FIG. 20. The block that corresponds to node 1 is divided into eightblocks. Of these eight blocks, blocks including effective VXLs are setas nodes, while the other blocks are set as leaves. Each block thatcorresponds to a node is further divided into eight nodes or leaves.These processes are repeated by the number of times that is equal to thenumber of levels in the octree structure. All blocks in the lowermostlevel are set as leaves.

FIG. 22 is a diagram showing an example SWLD generated from the WLDshown in FIG. 20. VXL1 and VXL2 shown in FIG. 20 are judged as FVXL1 andFVXL2 as a result of feature extraction, and thus are added to the SWLD.Meanwhile, VXL3 is not judged as a FVXL, and thus is not added to theSWLD. FIG. 23 is a diagram showing an octree structure of the SWLD shownin FIG. 22. In the octree structure shown in FIG. 23, leaf 3corresponding to VXL3 shown in FIG. 21 is deleted. Consequently, node 3shown in FIG. 21 has lost an effective VXL, and has changed to a leaf.As described above, a SWLD has a smaller number of leaves in generalthan a WLD does, and thus the encoded three-dimensional data of the SWLDis smaller than the encoded three-dimensional data of the WLD.

The following describes variations of the present embodiment.

For self-location estimation, for example, a client, being avehicle-mounted device, etc., may receive a SWLD from the server to usesuch SWLD to estimate the self-location. Meanwhile, for obstacledetection, the client may detect obstacles by use of three-dimensionalinformation on the periphery obtained by such client through variousmeans including a distance sensor such as a rangefinder, as well as astereo camera and a combination of a plurality of monocular cameras.

In general, a SWLD is less likely to include VXL data on a flat region.As such, the server may hold a subsample world (subWLD) obtained bysubsampling a WLD for detection of static obstacles, and send to theclient the SWLD and the subWLD. This enables the client to performself-location estimation and obstacle detection on the client's part,while reducing the network bandwidth.

When the client renders three-dimensional map data at a high speed, mapinformation having a mesh structure is more useful in some cases. Assuch, the server may generate a mesh from a WLD to hold it beforehand asa mesh world (MWLD). For example, when wishing to perform coarsethree-dimensional rendering, the client receives a MWLD, and whenwishing to perform detailed three-dimensional rendering, the clientreceives a WLD. This reduces the network bandwidth.

In the above description, the server sets, as FVXLs, VXLs having anamount of features greater than or equal to the threshold, but theserver may calculate FVXL by a different method. For example, the servermay judge that a VXL, a VLM, a SPC, or a GOS that constitutes a signal,or an intersection, etc. as necessary for self-location estimation,driving assist, or self-driving, etc., and incorporate such VXL, VLM,SPC, or GOS into a SWLD as a FVXL, a FVLM, a FSPC, or a FGOS. Suchjudgment may be made manually. Also, FVXLs, etc. that have been set onthe basis of an amount of features may be added to FVXLs, etc. obtainedby the above method. Stated differently SWLD extractor 403 may furtherextract, from input three-dimensional data 411, data corresponding to anobject having a predetermined attribute as extracted three-dimensionaldata 412.

Also, that a VXL, a VLM, a SPC, or a GOS is necessary for such intendedusage may be labeled separately from the features. The server mayseparately hold, as an upper layer of a SWLD (e.g., a lane world), FVXLsof a signal or an intersection, etc. necessary for self-locationestimation, driving assist, or self-driving, etc.

The server may also add an attribute to VXLs in a WLD on a random accessbasis or on a predetermined unit basis. An attribute, for example,includes information indicating whether VXLs are necessary forself-location estimation, or information indicating whether VXLs areimportant as traffic information such as a signal, or an intersection,etc. An attribute may also include a correspondence between VXLs andfeatures (intersection, or road, etc.) in lane information (geographicdata files (GDF), etc.).

A method as described below may be used to update a WLD or a SWLD.

Update information indicating changes, etc. in a person, a roadwork, ora tree line (for trucks) is uploaded to the server as point clouds ormeta data. The server updates a WLD on the basis of such uploadedinformation, and then updates a SWLD by use of the updated WLD.

The client, when detecting a mismatch between the three-dimensionalinformation such client has generated at the time of self-locationestimation and the three-dimensional information received from theserver, may send to the server the three-dimensional information suchclient has generated, together with an update notification. In such acase, the server updates the SWLD by use of the WLD. When the SWLD isnot to be updated, the server judges that the WLD itself is old.

In the above description, information that distinguishes whether anencoded stream is that of a WLD or a SWLD is added as header informationof the encoded stream. However, when there are many types of worlds suchas a mesh world and a lane world, information that distinguishes thesetypes of the worlds may be added to header information. Also, when thereare many SWLDs with different amounts of features, information thatdistinguishes the respective SWLDs may be added to header information.

In the above description, a SWLD is constituted by FVXLs, but a SWLD mayinclude VXL that have not been judged as FVXLs. For example, a SWLD mayinclude an adjacent VXL used to calculate the feature of a FVXL. Thisenables the client to calculate the feature of a FVXL when receiving aSWLD, even in the case where feature information is not added to eachFVXL of the SWLD. In such a case, the SWLD may include information thatdistinguishes whether each VXL is a FVXL or a VXL.

As described above, three-dimensional data encoding device 400 extracts,from input three-dimensional data 411 (first three-dimensional data),extracted three-dimensional data 412 (second three-dimensional data)having an amount of a feature greater than or equal to a threshold, andencodes extracted three-dimensional data 412 to generate encodedthree-dimensional data 414 (first encoded three-dimensional data).

This three-dimensional data encoding device 400 generates encodedthree-dimensional data 414 that is obtained by encoding data having anamount of a feature greater than or equal to the threshold. This reducesthe amount of data compared to the case where input three-dimensionaldata 411 is encoded as it is. Three-dimensional data encoding device 400is thus capable of reducing the amount of data to be transmitted.

Three-dimensional data encoding device 400 further encodes inputthree-dimensional data 411 to generate encoded three-dimensional data413 (second encoded three-dimensional data).

This three-dimensional data encoding device 400 enables selectivetransmission of encoded three-dimensional data 413 and encodedthree-dimensional data 414, in accordance, for example, with theintended use, etc.

Also, extracted three-dimensional data 412 is encoded by a firstencoding method, and input three-dimensional data 411 is encoded by asecond encoding method different from the first encoding method.

This three-dimensional data encoding device 400 enables the use of anencoding method suitable for each of input three-dimensional data 411and extracted three-dimensional data 412.

Also, of intra prediction and inter prediction, the inter prediction ismore preferentially performed in the first encoding method than in thesecond encoding method.

This three-dimensional data encoding device 400 enables inter predictionto be more preferentially performed on extracted three-dimensional data412 in which adjacent data items are likely to have low correlation.

Also, the first encoding method and the second encoding method representthree-dimensional positions differently. For example, the secondencoding method represents three-dimensional positions by octree, andthe first encoding method represents three-dimensional positions bythree-dimensional coordinates.

This three-dimensional data encoding device 400 enables the use of amore suitable method to represent the three-dimensional positions ofthree-dimensional data in consideration of the difference in the numberof data items (the number of VXLs or FVXLs) included.

Also, at least one of encoded three-dimensional data 413 and encodedthree-dimensional data 414 includes an identifier indicating whether theencoded three-dimensional data is encoded three-dimensional dataobtained by encoding input three-dimensional data 411 or encodedthree-dimensional data obtained by encoding part of inputthree-dimensional data 411. Stated differently, such identifierindicates whether the encoded three-dimensional data is encodedthree-dimensional data 413 of a WLD or encoded three-dimensional data414 of a SWLD.

This enables the decoding device to readily judge whether the obtainedencoded three-dimensional data is encoded three-dimensional data 413 orencoded three-dimensional data 414.

Also, three-dimensional data encoding device 400 encodes extractedthree-dimensional data 412 in a manner that encoded three-dimensionaldata 414 has a smaller data amount than a data amount of encodedthree-dimensional data 413.

This three-dimensional data encoding device 400 enables encodedthree-dimensional data 414 to have a smaller data amount than the dataamount of encoded three-dimensional data 413.

Also, three-dimensional data encoding device 400 further extracts datacorresponding to an object having a predetermined attribute from inputthree-dimensional data 411 as extracted three-dimensional data 412. Theobject having a predetermined attribute is, for example, an objectnecessary for self-location estimation, driving assist, or self-driving,etc., or more specifically, a signal, an intersection, etc.

This three-dimensional data encoding device 400 is capable of generatingencoded three-dimensional data 414 that includes data required by thedecoding device.

Also, three-dimensional data encoding device 400 (server) further sends,to a client, one of encoded three-dimensional data 413 and encodedthree-dimensional data 414 in accordance with a status of the client.

This three-dimensional data encoding device 400 is capable of sendingappropriate data in accordance with the status of the client.

Also, the status of the client includes one of a communication condition(e.g., network bandwidth) of the client and a traveling speed of theclient.

Also, three-dimensional data encoding device 400 further sends, to aclient, one of encoded three-dimensional data 413 and encodedthree-dimensional data 414 in accordance with a request from the client.

This three-dimensional data encoding device 400 is capable of sendingappropriate data in accordance with the request from the client.

Also, three-dimensional data decoding device 500 according to thepresent embodiment decodes encoded three-dimensional data 413 or encodedthree-dimensional data 414 generated by three-dimensional data encodingdevice 400 described above.

Stated differently, three-dimensional data decoding device 500 decodes,by a first decoding method, encoded three-dimensional data 414 obtainedby encoding extracted three-dimensional data 412 having an amount of afeature greater than or equal to a threshold, extractedthree-dimensional data 412 having been extracted from inputthree-dimensional data 411. Three-dimensional data decoding device 500also decodes, by a second decoding method, encoded three-dimensionaldata 413 obtained by encoding input three-dimensional data 411, thesecond decoding method being different from the first decoding method.

This three-dimensional data decoding device 500 enables selectivereception of encoded three-dimensional data 414 obtained by encodingdata having an amount of a feature greater than or equal to thethreshold and encoded three-dimensional data 413, in accordance, forexample, with the intended use, etc. Three-dimensional data decodingdevice 500 is thus capable of reducing the amount of data to betransmitted. Such three-dimensional data decoding device 500 furtherenables the use of a decoding method suitable for each of inputthree-dimensional data 411 and extracted three-dimensional data 412.

Also, of intra prediction and inter prediction, the inter prediction ismore preferentially performed in the first decoding method than in thesecond decoding method.

This three-dimensional data decoding device 500 enables inter predictionto be more preferentially performed on the extracted three-dimensionaldata in which adjacent data items are likely to have low correlation.

Also, the first decoding method and the second decoding method representthree-dimensional positions differently. For example, the seconddecoding method represents three-dimensional positions by octree, andthe first decoding method represents three-dimensional positions bythree-dimensional coordinates.

This three-dimensional data decoding device 500 enables the use of amore suitable method to represent the three-dimensional positions ofthree-dimensional data in consideration of the difference in the numberof data items (the number of VXLs or FVXLs) included.

Also, at least one of encoded three-dimensional data 413 and encodedthree-dimensional data 414 includes an identifier indicating whether theencoded three-dimensional data is encoded three-dimensional dataobtained by encoding input three-dimensional data 411 or encodedthree-dimensional data obtained by encoding part of inputthree-dimensional data 411. Three-dimensional data decoding device 500refers to such identifier in identifying between encodedthree-dimensional data 413 and encoded three-dimensional data 414.

This three-dimensional data decoding device 500 is capable of readilyjudging whether the obtained encoded three-dimensional data is encodedthree-dimensional data 413 or encoded three-dimensional data 414.

Three-dimensional data decoding device 500 further notifies a server ofa status of the client (three-dimensional data decoding device 500).Three-dimensional data decoding device 500 receives one of encodedthree-dimensional data 413 and encoded three-dimensional data 414 fromthe server, in accordance with the status of the client.

This three-dimensional data decoding device 500 is capable of receivingappropriate data in accordance with the status of the client.

Also, the status of the client includes one of a communication condition(e.g., network bandwidth) of the client and a traveling speed of theclient.

Three-dimensional data decoding device 500 further makes a request ofthe server for one of encoded three-dimensional data 413 and encodedthree-dimensional data 414, and receives one of encodedthree-dimensional data 413 and encoded three-dimensional data 414 fromthe server, in accordance with the request.

This three-dimensional data decoding device 500 is capable of receivingappropriate data in accordance with the intended use.

Embodiment 3

The present embodiment will describe a method of transmitting/receivingthree-dimensional data between vehicles. For example, thethree-dimensional data is transmitted/received between the own vehicleand the nearby vehicle.

FIG. 24 is a block diagram of three-dimensional data creation device 620according to the present embodiment. Such three-dimensional datacreation device 620, which is included, for example, in the own vehicle,mergers first three-dimensional data 632 created by three-dimensionaldata creation device 620 with the received second three-dimensional data635, thereby creating third three-dimensional data 636 having a higherdensity.

Such three-dimensional data creation device 620 includesthree-dimensional data creator 621, request range determiner 622,searcher 623, receiver 624, decoder 625, and merger 626.

First, three-dimensional data creator 621 creates firstthree-dimensional data 632 by use of sensor information 631 detected bythe sensor included in the own vehicle. Next, request range determiner622 determines a request range, which is the range of athree-dimensional space, the data on which is insufficient in thecreated first three-dimensional data 632.

Next, searcher 623 searches for the nearby vehicle having thethree-dimensional data of the request range, and sends request rangeinformation 633 indicating the request range to nearby vehicle 601having been searched out (S623). Next, receiver 624 receives encodedthree-dimensional data 634, which is an encoded stream of the requestrange, from nearby vehicle 601 (S624). Note that searcher 623 mayindiscriminately send requests to all vehicles included in a specifiedrange to receive encoded three-dimensional data 634 from a vehicle thathas responded to the request. Searcher 623 may send a request not onlyto vehicles but also to an object such as a signal and a sign, andreceive encoded three-dimensional data 634 from the object.

Next, decoder 625 decodes the received encoded three-dimensional data634, thereby obtaining second three-dimensional data 635. Next, merger626 merges first three-dimensional data 632 with secondthree-dimensional data 635, thereby creating three-dimensional data 636having a higher density.

Next, the structure and operations of three-dimensional datatransmission device 640 according to the present embodiment will bedescribed. FIG. 25 is a block diagram of three-dimensional datatransmission device 640.

Three-dimensional data transmission device 640 is included, for example,in the above-described nearby vehicle. Three-dimensional datatransmission device 640 processes fifth three-dimensional data 652created by the nearby vehicle into sixth three-dimensional data 654requested by the own vehicle, encodes sixth three-dimensional data 654to generate encoded three-dimensional data 634, and sends encodedthree-dimensional data 634 to the own vehicle.

Three-dimensional data transmission device 640 includesthree-dimensional data creator 641, receiver 642, extractor 643, encoder644, and transmitter 645.

First, three-dimensional data creator 641 creates fifththree-dimensional data 652 by use of sensor information 651 detected bythe sensor included in the nearby vehicle. Next, receiver 642 receivesrequest range information 633 from the own vehicle.

Next, extractor 643 extracts from fifth three-dimensional data 652 thethree-dimensional data of the request range indicated by request rangeinformation 633, thereby processing fifth three-dimensional data 652into sixth three-dimensional data 654. Next, encoder 644 encodes sixththree-dimensional data 654 to generate encoded three-dimensional data643, which is an encoded stream. Then, transmitter 645 sends encodedthree-dimensional data 634 to the own vehicle.

Note that although an example case is described here in which the ownvehicle includes three-dimensional data creation device 620 and thenearby vehicle includes three-dimensional data transmission device 640,each of the vehicles may include the functionality of boththree-dimensional data creation device 620 and three-dimensional datatransmission device 640.

Embodiment 4

The present embodiment describes operations performed in abnormal caseswhen self-location estimation is performed on the basis of athree-dimensional map.

A three-dimensional map is expected to find its expanded use inself-driving of a vehicle and autonomous movement, etc. of a mobileobject such as a robot and a flying object (e.g., a drone). Examplemeans for enabling such autonomous movement include a method in which amobile object travels in accordance with a three-dimensional map, whileestimating its self-location on the map (self-location estimation).

The self-location estimation is enabled by matching a three-dimensionalmap with three-dimensional information on the surrounding of the ownvehicle (hereinafter referred to as self-detected three-dimensionaldata) obtained by a sensor equipped in the own vehicle, such as arangefinder (e.g., a LiDAR) and a stereo camera to estimate the locationof the own vehicle on the three-dimensional map.

As in the case of an HD map suggested by HERE Technologies, for example,a three-dimensional map may include not only a three-dimensional pointcloud, but also two-dimensional map data such as information on theshapes of roads and intersections, or information that changes inreal-time such as information on a traffic jam and an accident. Athree-dimensional map includes a plurality of layers such as layers ofthree-dimensional data, two-dimensional data, and meta-data that changesin real-time, from among which the device can obtain or refer to onlynecessary data.

Point cloud data may be a SWLD as described above, or may include pointcloud data that is different from keypoints. The transmission/receptionof point cloud data is basically carried out in one or more randomaccess units.

A method described below is used as a method of matching athree-dimensional map with self-detected three-dimensional data. Forexample, the device compares the shapes of the point clouds in eachother's point clouds, and determines that portions having a high degreeof similarity among keypoints correspond to the same position. When thethree-dimensional map is formed by a SWLD, the device also performsmatching by comparing the keypoints that form the SWLD withthree-dimensional keypoints extracted from the self-detectedthree-dimensional data.

Here, to enable highly accurate self-location estimation, the followingneeds to be satisfied: (A) the three-dimensional map and theself-detected three-dimensional data have been already obtained; and (B)their accuracies satisfy a predetermined requirement. However, one of(A) and (B) cannot be satisfied in abnormal cases such as ones describedbelow.

1. A three-dimensional map is unobtainable over communication.

2. A three-dimensional map is not present, or a three-dimensional maphaving been obtained is corrupt.

3. A sensor of the own vehicle has trouble, or the accuracy of thegenerated self-detected three-dimensional data is inadequate due to badweather.

The following describes operations to cope with such abnormal cases. Thefollowing description illustrates an example case of a vehicle, but themethod described below is applicable to mobile objects on the whole thatare capable of autonomous movement, such as a robot and a drone.

The following describes the structure of the three-dimensionalinformation processing device and its operation according to the presentembodiment capable of coping with abnormal cases regarding athree-dimensional map or self-detected three-dimensional data. FIG. 26is a block diagram of an example structure of three-dimensionalinformation processing device 700 according to the present embodiment.

Three-dimensional information processing device 700 is equipped, forexample, in a mobile object such as a car. As shown in FIG. 26,three-dimensional information processing device 700 includesthree-dimensional map obtainer 701, self-detected data obtainer 702,abnormal case judgment unit 703, coping operation determiner 704, andoperation controller 705.

Note that three-dimensional information processing device 700 mayinclude a non-illustrated two-dimensional or one-dimensional sensor thatdetects a structural object or a mobile object around the own vehicle,such as a camera capable of obtaining two-dimensional images and asensor for one-dimensional data utilizing ultrasonic or laser.Three-dimensional information processing device 700 may also include anon-illustrated communication unit that obtains a three-dimensional mapover a mobile communication network, such as 4G and 5G, or viainter-vehicle communication or road-to-vehicle communication.

Three-dimensional map obtainer 701 obtains three-dimensional map 711 ofthe surroundings of the traveling route. For example, three-dimensionalmap obtainer 701 obtains three-dimensional map 711 over a mobilecommunication network, or via inter-vehicle communication orroad-to-vehicle communication.

Next, self-detected data obtainer 702 obtains self-detectedthree-dimensional data 712 on the basis of sensor information. Forexample, self-detected data obtainer 702 generates self-detectedthree-dimensional data 712 on the basis of the sensor informationobtained by a sensor equipped in the own vehicle.

Next, abnormal case judgment unit 703 conducts a predetermined check ofat least one of obtained three-dimensional map 711 and self-detectedthree-dimensional data 712 to detect an abnormal case. Stateddifferently, abnormal case judgment unit 703 judges whether at least oneof obtained three-dimensional map 711 and self-detectedthree-dimensional data 712 is abnormal.

When the abnormal case is detected, coping operation determiner 704determines a coping operation to cope with such abnormal case. Next,operation controller 705 controls the operation of each of theprocessing units necessary to perform the coping operation.

Meanwhile, when no abnormal case is detected, three-dimensionalinformation processing device 700 terminates the process.

Also, three-dimensional information processing device 700 estimates thelocation of the vehicle equipped with three-dimensional informationprocessing device 700, using three-dimensional map 711 and self-detectedthree-dimensional data 712. Next, three-dimensional informationprocessing device 700 performs the automatic operation of the vehicle byuse of the estimated location of the vehicle.

As described above, three-dimensional information processing device 700obtains, via a communication channel, map data (three-dimensional map711) that includes first three-dimensional position information. Thefirst three-dimensional position information includes, for example, aplurality of random access units, each of which is an assembly of atleast one subspace and is individually decodable, the at least onesubspace having three-dimensional coordinates information and serving asa unit in which each of the plurality of random access units is encoded.The first three-dimensional position information is, for example, data(SWLD) obtained by encoding keypoints, each of which has an amount of athree-dimensional feature greater than or equal to a predeterminedthreshold.

Three-dimensional information processing device 700 also generatessecond three-dimensional position information (self-detectedthree-dimensional data 712) from information detected by a sensor.Three-dimensional information processing device 700 then judges whetherone of the first three-dimensional position information and the secondthree-dimensional position information is abnormal by performing, on oneof the first three-dimensional position information and the secondthree-dimensional position information, a process of judging whether anabnormality is present.

Three-dimensional information processing device 700 determines a copingoperation to cope with the abnormality when one of the firstthree-dimensional position information and the second three-dimensionalposition information is judged to be abnormal. Three-dimensionalinformation processing device 700 then executes a control that isrequired to perform the coping operation.

This structure enables three-dimensional information processing device700 to detect an abnormality regarding one of the firstthree-dimensional position information and the second three-dimensionalposition information, and to perform a coping operation therefor.

Embodiment 5

The present embodiment describes a method, etc. of transmittingthree-dimensional data to a following vehicle.

FIG. 27 is a block diagram of an exemplary structure ofthree-dimensional data creation device 810 according to the presentembodiment. Such three-dimensional data creation device 810 is equipped,for example, in a vehicle. Three-dimensional data creation device 810transmits and receives three-dimensional data to and from an externalcloud-based traffic monitoring system, a preceding vehicle, or afollowing vehicle, and creates and stores three-dimensional data.

Three-dimensional data creation device 810 includes data receiver 811,communication unit 812, reception controller 813, format converter 814,a plurality of sensors 815, three-dimensional data creator 816,three-dimensional data synthesizer 817, three-dimensional data storage818, communication unit 819, transmission controller 820, formatconverter 821, and data transmitter 822.

Data receiver 811 receives three-dimensional data 831 from a cloud-basedtraffic monitoring system or a preceding vehicle. Three-dimensional data831 includes, for example, information on a region undetectable bysensors 815 of the own vehicle, such as a point cloud, visible lightvideo, depth information, sensor position information, and speedinformation.

Communication unit 812 communicates with the cloud-based trafficmonitoring system or the preceding vehicle to transmit a datatransmission request, etc. to the cloud-based traffic monitoring systemor the preceding vehicle.

Reception controller 813 exchanges information, such as information onsupported formats, with a communications partner via communication unit812 to establish communication with the communications partner.

Format converter 814 applies format conversion, etc. onthree-dimensional data 831 received by data receiver 811 to generatethree-dimensional data 832. Format converter 814 also decompresses ordecodes three-dimensional data 831 when three-dimensional data 831 iscompressed or encoded.

A plurality of sensors 815 are a group of sensors, such as visible lightcameras and infrared cameras, that obtain information on the outside ofthe vehicle and generate sensor information 833. Sensor information 833is, for example, three-dimensional data such as a point cloud (pointcloud data), when sensors 815 are laser sensors such as LiDARs. Notethat a single sensor may serve as a plurality of sensors 815.

Three-dimensional data creator 816 generates three-dimensional data 834from sensor information 833. Three-dimensional data 834 includes, forexample, information such as a point cloud, visible light video, depthinformation, sensor position information, and speed information.

Three-dimensional data synthesizer 817 synthesizes three-dimensionaldata 834 created on the basis of sensor information 833 of the ownvehicle with three-dimensional data 832 created by the cloud-basedtraffic monitoring system or the preceding vehicle, etc., therebyforming three-dimensional data 835 of a space that includes the spaceahead of the preceding vehicle undetectable by sensors 815 of the ownvehicle.

Three-dimensional data storage 818 stores generated three-dimensionaldata 835, etc.

Communication unit 819 communicates with the cloud-based trafficmonitoring system or the following vehicle to transmit a datatransmission request, etc. to the cloud-based traffic monitoring systemor the following vehicle.

Transmission controller 820 exchanges information such as information onsupported formats with a communications partner via communication unit819 to establish communication with the communications partner.Transmission controller 820 also determines a transmission region, whichis a space of the three-dimensional data to be transmitted, on the basisof three-dimensional data formation information on three-dimensionaldata 832 generated by three-dimensional data synthesizer 817 and thedata transmission request from the communications partner.

More specifically, transmission controller 820 determines a transmissionregion that includes the space ahead of the own vehicle undetectable bya sensor of the following vehicle, in response to the data transmissionrequest from the cloud-based traffic monitoring system or the followingvehicle. Transmission controller 820 judges, for example, whether aspace is transmittable or whether the already transmitted space includesan update, on the basis of the three-dimensional data formationinformation to determine a transmission region. For example,transmission controller 820 determines, as a transmission region, aregion that is: a region specified by the data transmission request; anda region, corresponding three-dimensional data 835 of which is present.Transmission controller 820 then notifies format converter 821 of theformat supported by the communications partner and the transmissionregion.

Of three-dimensional data 835 stored in three-dimensional data storage818, format converter 821 converts three-dimensional data 836 of thetransmission region into the format supported by the receiver end togenerate three-dimensional data 837. Note that format converter 821 maycompress or encode three-dimensional data 837 to reduce the data amount.

Data transmitter 822 transmits three-dimensional data 837 to thecloud-based traffic monitoring system or the following vehicle. Suchthree-dimensional data 837 includes, for example, information on a blindspot, which is a region hidden from view of the following vehicle, suchas a point cloud ahead of the own vehicle, visible light video, depthinformation, and sensor position information.

Note that an example has been described in which format converter 814and format converter 821 perform format conversion, etc., but formatconversion may not be performed.

With the above structure, three-dimensional data creation device 810obtains, from an external device, three-dimensional data 831 of a regionundetectable by sensors 815 of the own vehicle, and synthesizesthree-dimensional data 831 with three-dimensional data 834 that is basedon sensor information 833 detected by sensors 815 of the own vehicle,thereby generating three-dimensional data 835. Three-dimensional datacreation device 810 is thus capable of generating three-dimensional dataof a range undetectable by sensors 815 of the own vehicle.

Three-dimensional data creation device 810 is also capable oftransmitting, to the cloud-based traffic monitoring system or thefollowing vehicle, etc., three-dimensional data of a space that includesthe space ahead of the own vehicle undetectable by a sensor of thefollowing vehicle, in response to the data transmission request from thecloud-based traffic monitoring system or the following vehicle.

Embodiment 6

In embodiment 5, an example is described in which a client device of avehicle or the like transmits three-dimensional data to another vehicleor a server such as a cloud-based traffic monitoring system. In thepresent embodiment, a client device transmits sensor informationobtained through a sensor to a server or a client device.

A structure of a system according to the present embodiment will firstbe described. FIG. 28 is a diagram showing the structure of atransmission/reception system of a three-dimensional map and sensorinformation according to the present embodiment. This system includesserver 901, and client devices 902A and 902B. Note that client devices902A and 902B are also referred to as client device 902 when noparticular distinction is made therebetween.

Client device 902 is, for example, a vehicle-mounted device equipped ina mobile object such as a vehicle. Server 901 is, for example, acloud-based traffic monitoring system, and is capable of communicatingwith the plurality of client devices 902.

Server 901 transmits the three-dimensional map formed by a point cloudto client device 902. Note that a structure of the three-dimensional mapis not limited to a point cloud, and may also be another structureexpressing three-dimensional data such as a mesh structure.

Client device 902 transmits the sensor information obtained by clientdevice 902 to server 901. The sensor information includes, for example,at least one of information obtained by LiDAR, a visible light image, aninfrared image, a depth image, sensor position information, or sensorspeed information.

The data to be transmitted and received between server 901 and clientdevice 902 may be compressed in order to reduce data volume, and mayalso be transmitted uncompressed in order to maintain data precision.When compressing the data, it is possible to use a three-dimensionalcompression method on the point cloud based on, for example, an octreestructure. It is possible to use a two-dimensional image compressionmethod on the visible light image, the infrared image, and the depthimage. The two-dimensional image compression method is, for example,MPEG-4 AVC or HEVC standardized by MPEG.

Server 901 transmits the three-dimensional map managed by server 901 toclient device 902 in response to a transmission request for thethree-dimensional map from client device 902. Note that server 901 mayalso transmit the three-dimensional map without waiting for thetransmission request for the three-dimensional map from client device902. For example, server 901 may broadcast the three-dimensional map toat least one client device 902 located in a predetermined space. Server901 may also transmit the three-dimensional map suited to a position ofclient device 902 at fixed time intervals to client device 902 that hasreceived the transmission request once. Server 901 may also transmit thethree-dimensional map managed by server 901 to client device 902 everytime the three-dimensional map is updated.

Client device 902 sends the transmission request for thethree-dimensional map to server 901. For example, when client device 902wants to perform the self-location estimation during traveling, clientdevice 902 transmits the transmission request for the three-dimensionalmap to server 901.

Note that in the following cases, client device 902 may send thetransmission request for the three-dimensional map to server 901. Clientdevice 902 may send the transmission request for the three-dimensionalmap to server 901 when the three-dimensional map stored by client device902 is old. For example, client device 902 may send the transmissionrequest for the three-dimensional map to server 901 when a fixed periodhas passed since the three-dimensional map is obtained by client device902.

Client device 902 may also send the transmission request for thethree-dimensional map to server 901 before a fixed time when clientdevice 902 exits a space shown in the three-dimensional map stored byclient device 902. For example, client device 902 may send thetransmission request for the three-dimensional map to server 901 whenclient device 902 is located within a predetermined distance from aboundary of the space shown in the three-dimensional map stored byclient device 902. When a movement path and a movement speed of clientdevice 902 are understood, a time when client device 902 exits the spaceshown in the three-dimensional map stored by client device 902 may bepredicted based on the movement path and the movement speed of clientdevice 902.

Client device 902 may also send the transmission request for thethree-dimensional map to server 901 when an error during alignment ofthe three-dimensional data and the three-dimensional map created fromthe sensor information by client device 902 is at least at a fixedlevel.

Client device 902 transmits the sensor information to server 901 inresponse to a transmission request for the sensor information fromserver 901. Note that client device 902 may transmit the sensorinformation to server 901 without waiting for the transmission requestfor the sensor information from server 901. For example, client device902 may periodically transmit the sensor information during a fixedperiod when client device 902 has received the transmission request forthe sensor information from server 901 once. Client device 902 maydetermine that there is a possibility of a change in thethree-dimensional map of a surrounding area of client device 902 havingoccurred, and transmit this information and the sensor information toserver 901, when the error during alignment of the three-dimensionaldata created by client device 902 based on the sensor information andthe three-dimensional map obtained from server 901 is at least at thefixed level.

Server 901 sends a transmission request for the sensor information toclient device 902. For example, server 901 receives positioninformation, such as GPS information, about client device 902 fromclient device 902. Server 901 sends the transmission request for thesensor information to client device 902 in order to generate a newthree-dimensional map, when it is determined that client device 902 isapproaching a space in which the three-dimensional map managed by server901 contains little information, based on the position information aboutclient device 902. Server 901 may also send the transmission request forthe sensor information, when wanting to (i) update the three-dimensionalmap, (ii) check road conditions during snowfall, a disaster, or thelike, or (iii) check traffic congestion conditions, accident/incidentconditions, or the like.

Client device 902 may set an amount of data of the sensor information tobe transmitted to server 901 in accordance with communication conditionsor bandwidth during reception of the transmission request for the sensorinformation to be received from server 901. Setting the amount of dataof the sensor information to be transmitted to server 901 is, forexample, increasing/reducing the data itself or appropriately selectinga compression method.

FIG. 29 is a block diagram showing an example structure of client device902. Client device 902 receives the three-dimensional map formed by apoint cloud and the like from server 901, and estimates a self-locationof client device 902 using the three-dimensional map created based onthe sensor information of client device 902. Client device 902 transmitsthe obtained sensor information to server 901.

Client device 902 includes data receiver 1011, communication unit 1012,reception controller 1013, format converter 1014, sensors 1015,three-dimensional data creator 1016, three-dimensional image processor1017, three-dimensional data storage 1018, format converter 1019,communication unit 1020, transmission controller 1021, and datatransmitter 1022.

Data receiver 1011 receives three-dimensional map 1031 from server 901.Three-dimensional map 1031 is data that includes a point cloud such as aWLD or a SWLD. Three-dimensional map 1031 may include compressed data oruncompressed data.

Communication unit 1012 communicates with server 901 and transmits adata transmission request (e.g. transmission request forthree-dimensional map) to server 901.

Reception controller 1013 exchanges information, such as information onsupported formats, with a communications partner via communication unit1012 to establish communication with the communications partner.

Format converter 1014 performs a format conversion and the like onthree-dimensional map 1031 received by data receiver 1011 to generatethree-dimensional map 1032. Format converter 1014 also performs adecompression or decoding process when three-dimensional map 1031 iscompressed or encoded. Note that format converter 1014 does not performthe decompression or decoding process when three-dimensional map 1031 isuncompressed data.

Sensors 815 are a group of sensors, such as LiDARs, visible lightcameras, infrared cameras, or depth sensors that obtain informationabout the outside of a vehicle equipped with client device 902, andgenerate sensor information 1033. Sensor information 1033 is, forexample, three-dimensional data such as a point cloud (point cloud data)when sensors 1015 are laser sensors such as LiDARs. Note that a singlesensor may serve as sensors 1015.

Three-dimensional data creator 1016 generates three-dimensional data1034 of a surrounding area of the own vehicle based on sensorinformation 1033. For example, three-dimensional data creator 1016generates point cloud data with color information on the surroundingarea of the own vehicle using information obtained by LiDAR and visiblelight video obtained by a visible light camera.

Three-dimensional image processor 1017 performs a self-locationestimation process and the like of the own vehicle, using (i) thereceived three-dimensional map 1032 such as a point cloud, and (ii)three-dimensional data 1034 of the surrounding area of the own vehiclegenerated using sensor information 1033. Note that three-dimensionalimage processor 1017 may generate three-dimensional data 1035 about thesurroundings of the own vehicle by merging three-dimensional map 1032and three-dimensional data 1034, and may perform the self-locationestimation process using the created three-dimensional data 1035.

Three-dimensional data storage 1018 stores three-dimensional map 1032,three-dimensional data 1034, three-dimensional data 1035, and the like.

Format converter 1019 generates sensor information 1037 by convertingsensor information 1033 to a format supported by a receiver end. Notethat format converter 1019 may reduce the amount of data by compressingor encoding sensor information 1037. Format converter 1019 may omit thisprocess when format conversion is not necessary. Format converter 1019may also control the amount of data to be transmitted in accordance witha specified transmission range.

Communication unit 1020 communicates with server 901 and receives a datatransmission request (transmission request for sensor information) andthe like from server 901.

Transmission controller 1021 exchanges information, such as informationon supported formats, with a communications partner via communicationunit 1020 to establish communication with the communications partner.

Data transmitter 1022 transmits sensor information 1037 to server 901.Sensor information 1037 includes, for example, information obtainedthrough sensors 1015, such as information obtained by LiDAR, a luminanceimage obtained by a visible light camera, an infrared image obtained byan infrared camera, a depth image obtained by a depth sensor, sensorposition information, and sensor speed information.

A structure of server 901 will be described next. FIG. 30 is a blockdiagram showing an example structure of server 901. Server 901 transmitssensor information from client device 902 and creates three-dimensionaldata based on the received sensor information. Server 901 updates thethree-dimensional map managed by server 901 using the createdthree-dimensional data. Server 901 transmits the updatedthree-dimensional map to client device 902 in response to a transmissionrequest for the three-dimensional map from client device 902.

Server 901 includes data receiver 1111, communication unit 1112,reception controller 1113, format converter 1114, three-dimensional datacreator 1116, three-dimensional data merger 1117, three-dimensional datastorage 1118, format converter 1119, communication unit 1120,transmission controller 1121, and data transmitter 1122.

Data receiver 1111 receives sensor information 1037 from client device902. Sensor information 1037 includes, for example, information obtainedby LiDAR, a luminance image obtained by a visible light camera, aninfrared image obtained by an infrared camera, a depth image obtained bya depth sensor, sensor position information, sensor speed information,and the like.

Communication unit 1112 communicates with client device 902 andtransmits a data transmission request (e.g. transmission request forsensor information) and the like to client device 902.

Reception controller 1113 exchanges information, such as information onsupported formats, with a communications partner via communication unit1112 to establish communication with the communications partner.

Format converter 1114 generates sensor information 1132 by performing adecompression or decoding process when received sensor information 1037is compressed or encoded. Note that format converter 1114 does notperform the decompression or decoding process when sensor information1037 is uncompressed data.

Three-dimensional data creator 1116 generates three-dimensional data1134 of a surrounding area of client device 902 based on sensorinformation 1132. For example, three-dimensional data creator 1116generates point cloud data with color information on the surroundingarea of client device 902 using information obtained by LiDAR andvisible light video obtained by a visible light camera.

Three-dimensional data merger 1117 updates three-dimensional map 1135 bymerging three-dimensional data 1134 created based on sensor information1132 with three-dimensional map 1135 managed by server 901.

Three-dimensional data storage 1118 stores three-dimensional map 1135and the like.

Format converter 1119 generates three-dimensional map 1031 by convertingthree-dimensional map 1135 to a format supported by the receiver end.Note that format converter 1119 may reduce the amount of data bycompressing or encoding three-dimensional map 1135. Format converter1119 may omit this process when format conversion is not necessary.Format converter 1119 may also control the amount of data to betransmitted in accordance with a specified transmission range.

Communication unit 1120 communicates with client device 902 and receivesa data transmission request (transmission request for three-dimensionalmap) and the like from client device 902.

Transmission controller 1121 exchanges information, such as informationon supported formats, with a communications partner via communicationunit 1120 to establish communication with the communications partner.

Data transmitter 1122 transmits three-dimensional map 1031 to clientdevice 902. Three-dimensional map 1031 is data that includes a pointcloud such as a WLD or a SWLD. Three-dimensional map 1031 may includeone of compressed data and uncompressed data.

An operational flow of client device 902 will be described next. FIG. 31is a flowchart of an operation when client device 902 obtains thethree-dimensional map.

Client device 902 first requests server 901 to transmit thethree-dimensional map (point cloud, etc.) (S1001). At this point, byalso transmitting the position information about client device 902obtained through GPS and the like, client device 902 may also requestserver 901 to transmit a three-dimensional map relating to this positioninformation.

Client device 902 next receives the three-dimensional map from server901 (S1002). When the received three-dimensional map is compressed data,client device 902 decodes the received three-dimensional map andgenerates an uncompressed three-dimensional map (S1003).

Client device 902 next creates three-dimensional data 1034 of thesurrounding area of client device 902 using sensor information 1033obtained by sensors 1015 (S1004). Client device 902 next estimates theself-location of client device 902 using three-dimensional map 1032received from server 901 and three-dimensional data 1034 created usingsensor information 1033 (S1005).

FIG. 32 is a flowchart of an operation when client device 902 transmitsthe sensor information. Client device 902 first receives a transmissionrequest for the sensor information from server 901 (S1011). Clientdevice 902 that has received the transmission request transmits sensorinformation 1037 to server 901 (S1012). Note that client device 902 maygenerate sensor information 1037 by compressing each piece ofinformation using a compression method suited to each piece ofinformation, when sensor information 1033 includes a plurality of piecesof information obtained by sensors 1015.

An operational flow of server 901 will be described next. FIG. 33 is aflowchart of an operation when server 901 obtains the sensorinformation. Server 901 first requests client device 902 to transmit thesensor information (S1021). Server 901 next receives sensor information1037 transmitted from client device 902 in accordance with the request(S1022). Server 901 next creates three-dimensional data 1134 using thereceived sensor information 1037 (S1023). Server 901 next reflects thecreated three-dimensional data 1134 in three-dimensional map 1135(S1024).

FIG. 34 is a flowchart of an operation when server 901 transmits thethree-dimensional map. Server 901 first receives a transmission requestfor the three-dimensional map from client device 902 (S1031). Server 901that has received the transmission request for the three-dimensional maptransmits the three-dimensional map to client device 902 (S1032). Atthis point, server 901 may extract a three-dimensional map of a vicinityof client device 902 along with the position information about clientdevice 902, and transmit the extracted three-dimensional map. Server 901may compress the three-dimensional map formed by a point cloud using,for example, an octree structure compression method, and transmit thecompressed three-dimensional map.

Hereinafter, variations of the present embodiment will be described.

Server 901 creates three-dimensional data 1134 of a vicinity of aposition of client device 902 using sensor information 1037 receivedfrom client device 902. Server 901 next calculates a difference betweenthree-dimensional data 1134 and three-dimensional map 1135, by matchingthe created three-dimensional data 1134 with three-dimensional map 1135of the same area managed by server 901. Server 901 determines that atype of anomaly has occurred in the surrounding area of client device902, when the difference is greater than or equal to a predeterminedthreshold. For example, it is conceivable that a large difference occursbetween three-dimensional map 1135 managed by server 901 andthree-dimensional data 1134 created based on sensor information 1037,when land subsidence and the like occurs due to a natural disaster suchas an earthquake.

Sensor information 1037 may include information indicating at least oneof a sensor type, a sensor performance, and a sensor model number.Sensor information 1037 may also be appended with a class ID and thelike in accordance with the sensor performance. For example, when sensorinformation 1037 is obtained by LiDAR, it is conceivable to assignidentifiers to the sensor performance. A sensor capable of obtaininginformation with precision in units of several millimeters is class 1, asensor capable of obtaining information with precision in units ofseveral centimeters is class 2, and a sensor capable of obtaininginformation with precision in units of several meters is class 3. Server901 may estimate sensor performance information and the like from amodel number of client device 902. For example, when client device 902is equipped in a vehicle, server 901 may determine sensor specificationinformation from a type of the vehicle. In this case, server 901 mayobtain information on the type of the vehicle in advance, and theinformation may also be included in the sensor information. Server 901may change a degree of correction with respect to three-dimensional data1134 created using sensor information 1037, using obtained sensorinformation 1037. For example, when the sensor performance is high inprecision (class 1), server 901 does not correct three-dimensional data1134. When the sensor performance is low in precision (class 3), server901 corrects three-dimensional data 1134 in accordance with theprecision of the sensor. For example, server 901 increases the degree(intensity) of correction with a decrease in the precision of thesensor.

Server 901 may simultaneously send the transmission request for thesensor information to the plurality of client devices 902 in a certainspace. Server 901 does not need to use all of the sensor information forcreating three-dimensional data 1134 and may, for example, select sensorinformation to be used in accordance with the sensor performance, whenhaving received a plurality of pieces of sensor information from theplurality of client devices 902. For example, when updatingthree-dimensional map 1135, server 901 may select high-precision sensorinformation (class 1) from among the received plurality of pieces ofsensor information, and create three-dimensional data 1134 using theselected sensor information.

Server 901 is not limited to only being a server such as a cloud-basedtraffic monitoring system, and may also be another (vehicle-mounted)client device. FIG. 35 is a diagram of a system structure in this case.

For example, client device 902C sends a transmission request for sensorinformation to client device 902A located nearby, and obtains the sensorinformation from client device 902A. Client device 902C then createsthree-dimensional data using the obtained sensor information of clientdevice 902A, and updates a three-dimensional map of client device 902C.This enables client device 902C to generate a three-dimensional map of aspace that can be obtained from client device 902A, and fully utilizethe performance of client device 902C. For example, such a case isconceivable when client device 902C has high performance.

In this case, client device 902A that has provided the sensorinformation is given rights to obtain the high-precisionthree-dimensional map generated by client device 902C. Client device902A receives the high-precision three-dimensional map from clientdevice 902C in accordance with these rights.

Server 901 may send the transmission request for the sensor informationto the plurality of client devices 902 (client device 902A and clientdevice 902B) located nearby client device 902C. When a sensor of clientdevice 902A or client device 902B has high performance, client device902C is capable of creating the three-dimensional data using the sensorinformation obtained by this high-performance sensor.

FIG. 36 is a block diagram showing a functionality structure of server901 and client device 902. Server 901 includes, for example,three-dimensional map compression/decoding processor 1201 thatcompresses and decodes the three-dimensional map and sensor informationcompression/decoding processor 1202 that compresses and decodes thesensor information.

Client device 902 includes three-dimensional map decoding processor 1211and sensor information compression processor 1212. Three-dimensional mapdecoding processor 1211 receives encoded data of the compressedthree-dimensional map, decodes the encoded data, and obtains thethree-dimensional map. Sensor information compression processor 1212compresses the sensor information itself instead of thethree-dimensional data created using the obtained sensor information,and transmits the encoded data of the compressed sensor information toserver 901. With this structure, client device 902 does not need tointernally store a processor that performs a process for compressing thethree-dimensional data of the three-dimensional map (point cloud, etc.),as long as client device 902 internally stores a processor that performsa process for decoding the three-dimensional map (point cloud, etc.).This makes it possible to limit costs, power consumption, and the likeof client device 902.

As stated above, client device 902 according to the present embodimentis equipped in the mobile object, and creates three-dimensional data1034 of a surrounding area of the mobile object using sensor information1033 that is obtained through sensor 1015 equipped in the mobile objectand indicates a surrounding condition of the mobile object. Clientdevice 902 estimates a self-location of the mobile object using thecreated three-dimensional data 1034. Client device 902 transmitsobtained sensor information 1033 to server 901 or another mobile object.

This enables client device 902 to transmit sensor information 1033 toserver 901 or the like. This makes it possible to further reduce theamount of transmission data compared to when transmitting thethree-dimensional data. Since there is no need for client device 902 toperform processes such as compressing or encoding the three-dimensionaldata, it is possible to reduce the processing amount of client device902. As such, client device 902 is capable of reducing the amount ofdata to be transmitted or simplifying the structure of the device.

Client device 902 further transmits the transmission request for thethree-dimensional map to server 901 and receives three-dimensional map1031 from server 901. In the estimating of the self-location, clientdevice 902 estimates the self-location using three-dimensional data 1034and three-dimensional map 1032.

Sensor information 1034 includes at least one of information obtained bya laser sensor, a luminance image, an infrared image, a depth image,sensor position information, or sensor speed information.

Sensor information 1033 includes information that indicates aperformance of the sensor.

Client device 902 encodes or compresses sensor information 1033, and inthe transmitting of the sensor information, transmits sensor information1037 that has been encoded or compressed to server 901 or another mobileobject 902. This enables client device 902 to reduce the amount of datato be transmitted.

For example, client device 902 includes a processor and memory. Theprocessor performs the above processes using the memory.

Server 901 according to the present embodiment is capable ofcommunicating with client device 902 equipped in the mobile object, andreceives sensor information 1037 that is obtained through sensor 1015equipped in the mobile object and indicates a surrounding condition ofthe mobile object. Server 901 creates three-dimensional data 1134 of asurrounding area of the mobile object using received sensor information1037.

With this, server 901 creates three-dimensional data 1134 using sensorinformation 1037 transmitted from client device 902. This makes itpossible to further reduce the amount of transmission data compared towhen client device 902 transmits the three-dimensional data. Since thereis no need for client device 902 to perform processes such ascompressing or encoding the three-dimensional data, it is possible toreduce the processing amount of client device 902. As such, server 901is capable of reducing the amount of data to be transmitted orsimplifying the structure of the device.

Server 901 further transmits a transmission request for the sensorinformation to client device 902.

Server 901 further updates three-dimensional map 1135 using the createdthree-dimensional data 1134, and transmits three-dimensional map 1135 toclient device 902 in response to the transmission request forthree-dimensional map 1135 from client device 902.

Sensor information 1037 includes at least one of information obtained bya laser sensor, a luminance image, an infrared image, a depth image,sensor position information, or sensor speed information.

Sensor information 1037 includes information that indicates aperformance of the sensor.

Server 901 further corrects the three-dimensional data in accordancewith the performance of the sensor. This enables the three-dimensionaldata creation method to improve the quality of the three-dimensionaldata.

In the receiving of the sensor information, server 901 receives aplurality of pieces of sensor information 1037 received from a pluralityof client devices 902, and selects sensor information 1037 to be used inthe creating of three-dimensional data 1134, based on a plurality ofpieces of information that each indicates the performance of the sensorincluded in the plurality of pieces of sensor information 1037. Thisenables server 901 to improve the quality of three-dimensional data1134.

Server 901 decodes or decompresses received sensor information 1037, andcreates three-dimensional data 1134 using sensor information 1132 thathas been decoded or decompressed. This enables server 901 to reduce theamount of data to be transmitted.

For example, server 901 includes a processor and memory. The processorperforms the above processes using the memory.

Embodiment 7

In the present embodiment, three-dimensional data encoding and decodingmethods using an inter prediction process will be described.

FIG. 37 is a block diagram of three-dimensional data encoding device1300 according to the present embodiment. This three-dimensional dataencoding device 1300 generates an encoded bitstream (hereinafter, alsosimply referred to as bitstream) that is an encoded signal, by encodingthree-dimensional data. As illustrated in FIG. 37, three-dimensionaldata encoding device 1300 includes divider 1301, subtractor 1302,transformer 1303, quantizer 1304, inverse quantizer 1305, inversetransformer 1306, adder 1307, reference volume memory 1308, intrapredictor 1309, reference space memory 1310, inter predictor 1311,prediction controller 1312, and entropy encoder 1313.

Divider 1301 divides a plurality of volumes (VLMs) that are encodingunits of each space (SPC) included in the three-dimensional data.Divider 1301 makes an octree representation (make into an octree) ofvoxels in each volume. Note that divider 1301 may make the spaces intoan octree representation with the spaces having the same size as thevolumes. Divider 1301 may also append information (depth information,etc.) necessary for making the octree representation to a header and thelike of a bitstream.

Subtractor 1302 calculates a difference between a volume (encodingtarget volume) outputted by divider 1301 and a predicted volumegenerated through intra prediction or inter prediction, which will bedescribed later, and outputs the calculated difference to transformer1303 as a prediction residual. FIG. 38 is a diagram showing an examplecalculation of the prediction residual. Note that bit sequences of theencoding target volume and the predicted volume shown here are, forexample, position information indicating positions of three-dimensionalpoints included in the volumes.

Hereinafter, a scan order of an octree representation and voxels will bedescribed. A volume is encoded after being converted into an octreestructure (made into an octree). The octree structure includes nodes andleaves. Each node has eight nodes or leaves, and each leaf has voxel(VXL) information. FIG. 39 is a diagram showing an example structure ofa volume including voxels. FIG. 40 is a diagram showing an example ofthe volume shown in FIG. 39 having been converted into the octreestructure. Among the leaves shown in FIG. 40, leaves 1, 2, and 3respectively represent VXL 1, VXL 2, and VXL 3, and represent VXLsincluding a point cloud (hereinafter, active VXLs).

An octree is represented by, for example, binary sequences of 1s and 0s.For example, when giving the nodes or the active VXLs a value of 1 andeverything else a value of 0, each node and leaf is assigned with thebinary sequence shown in FIG. 40. Thus, this binary sequence is scannedin accordance with a breadth-first or a depth-first scan order. Forexample, when scanning breadth-first, the binary sequence shown in A ofFIG. 41 is obtained. When scanning depth-first, the binary sequenceshown in B of FIG. 41 is obtained. The binary sequences obtained throughthis scanning are encoded through entropy encoding, which reduces anamount of information.

Depth information in the octree representation will be described next.Depth in the octree representation is used in order to control up to howfine a granularity point cloud information included in a volume isstored. Upon setting a great depth, it is possible to reproduce thepoint cloud information to a more precise level, but an amount of datafor representing the nodes and leaves increases. Upon setting a smalldepth, however, the amount of data decreases, but some information thatthe point cloud information originally held is lost, since pieces ofpoint cloud information including different positions and differentcolors are now considered as pieces of point cloud information includingthe same position and the same color.

For example, FIG. 42 is a diagram showing an example in which the octreewith a depth of 2 shown in FIG. 40 is represented with a depth of 1. Theoctree shown in FIG. 42 has a lower amount of data than the octree shownin FIG. 40. In other words, the binarized octree shown in FIG. 42 has alower bit count than the octree shown in FIG. 40. Leaf 1 and leaf 2shown in FIG. 40 are represented by leaf 1 shown in FIG. 41. In otherwords, the information on leaf 1 and leaf 2 being in different positionsis lost.

FIG. 43 is a diagram showing a volume corresponding to the octree shownin FIG. 42. VXL 1 and VXL 2 shown in FIG. 39 correspond to VXL 12 shownin FIG. 43. In this case, three-dimensional data encoding device 1300generates color information of VXL 12 shown in FIG. 43 using colorinformation of VXL 1 and VXL 2 shown in FIG. 39. For example,three-dimensional data encoding device 1300 calculates an average value,a median, a weighted average value, or the like of the color informationof VXL 1 and VXL 2 as the color information of VXL 12. In this manner,three-dimensional data encoding device 1300 may control a reduction ofthe amount of data by changing the depth of the octree.

Three-dimensional data encoding device 1300 may set the depthinformation of the octree to units of worlds, units of spaces, or unitsof volumes. In this case, three-dimensional data encoding device 1300may append the depth information to header information of the world,header information of the space, or header information of the volume. Inall worlds, spaces, and volumes associated with different times, thesame value may be used as the depth information. In this case,three-dimensional data encoding device 1300 may append the depthinformation to header information managing the worlds associated withall times.

When the color information is included in the voxels, transformer 1303applies frequency transformation, e.g. orthogonal transformation, to aprediction residual of the color information of the voxels in thevolume. For example, transformer 1303 creates a one-dimensional array byscanning the prediction residual in a certain scan order. Subsequently,transformer 1303 transforms the one-dimensional array to a frequencydomain by applying one-dimensional orthogonal transformation to thecreated one-dimensional array. With this, when a value of the predictionresidual in the volume is similar, a value of a low-frequency componentincreases and a value of a high-frequency component decreases. As such,it is possible to more efficiently reduce a code amount in quantizer1304.

Transformer 1303 does not need to use orthogonal transformation in onedimension, but may also use orthogonal transformation in two or moredimensions. For example, transformer 1303 maps the prediction residualto a two-dimensional array in a certain scan order, and appliestwo-dimensional orthogonal transformation to the obtainedtwo-dimensional array. Transformer 1303 may select an orthogonaltransformation method to be used from a plurality of orthogonaltransformation methods. In this case, three-dimensional data encodingdevice 1300 appends, to the bitstream, information indicating whichorthogonal transformation method is used. Transformer 1303 may select anorthogonal transformation method to be used from a plurality oforthogonal transformation methods in different dimensions. In this case,three-dimensional data encoding device 1300 appends, to the bitstream,in how many dimensions the orthogonal transformation method is used.

For example, transformer 1303 matches the scan order of the predictionresidual to a scan order (breadth-first, depth-first, or the like) inthe octree in the volume. This makes it possible to reduce overhead,since information indicating the scan order of the prediction residualdoes not need to be appended to the bitstream. Transformer 1303 mayapply a scan order different from the scan order of the octree. In thiscase, three-dimensional data encoding device 1300 appends, to thebitstream, information indicating the scan order of the predictionresidual. This enables three-dimensional data encoding device 1300 toefficiently encode the prediction residual. Three-dimensional dataencoding device 1300 may append, to the bitstream, information (flag,etc.) indicating whether to apply the scan order of the octree, and mayalso append, to the bitstream, information indicating the scan order ofthe prediction residual when the scan order of the octree is notapplied.

Transformer 1303 does not only transform the prediction residual of thecolor information, and may also transform other attribute informationincluded in the voxels. For example, transformer 1303 may transform andencode information, such as reflectance information, obtained whenobtaining a point cloud through LiDAR and the like.

Transformer 1303 may skip these processes when the spaces do not includeattribute information such as color information. Three-dimensional dataencoding device 1300 may append, to the bitstream, information (flag)indicating whether to skip the processes of transformer 1303.

Quantizer 1304 generates a quantized coefficient by performingquantization using a quantization control parameter on a frequencycomponent of the prediction residual generated by transformer 1303. Withthis, the amount of information is further reduced. The generatedquantized coefficient is outputted to entropy encoder 1313. Quantizer1304 may control the quantization control parameter in units of worlds,units of spaces, or units of volumes. In this case, three-dimensionaldata encoding device 1300 appends the quantization control parameter toeach header information and the like. Quantizer 1304 may performquantization control by changing a weight per frequency component of theprediction residual. For example, quantizer 1304 may precisely quantizea low-frequency component and roughly quantize a high-frequencycomponent. In this case, three-dimensional data encoding device 1300 mayappend, to a header, a parameter expressing a weight of each frequencycomponent.

Quantizer 1304 may skip these processes when the spaces do not includeattribute information such as color information. Three-dimensional dataencoding device 1300 may append, to the bitstream, information (flag)indicating whether to skip the processes of quantizer 1304.

Inverse quantizer 1305 generates an inverse quantized coefficient of theprediction residual by performing inverse quantization on the quantizedcoefficient generated by quantizer 1304 using the quantization controlparameter, and outputs the generated inverse quantized coefficient toinverse transformer 1306.

Inverse transformer 1306 generates an inverse transformation-appliedprediction residual by applying inverse transformation on the inversequantized coefficient generated by inverse quantizer 1305. This inversetransformation-applied prediction residual does not need to completelycoincide with the prediction residual outputted by transformer 1303,since the inverse transformation-applied prediction residual is aprediction residual that is generated after the quantization.

Adder 1307 adds, to generate a reconstructed volume, (i) the inversetransformation-applied prediction residual generated by inversetransformer 1306 to (ii) a predicted volume that is generated throughintra prediction or intra prediction, which will be described later, andis used to generate a pre-quantized prediction residual. Thisreconstructed volume is stored in reference volume memory 1308 orreference space memory 1310.

Intra predictor 1309 generates a predicted volume of an encoding targetvolume using attribute information of a neighboring volume stored inreference volume memory 1308. The attribute information includes colorinformation or a reflectance of the voxels. Intra predictor 1309generates a predicted value of color information or a reflectance of theencoding target volume.

FIG. 44 is a diagram for describing an operation of intra predictor1309. For example, intra predictor 1309 generates the predicted volumeof the encoding target volume (volume idx=3) shown in FIG. 44, using aneighboring volume (volume idx=0). Volume idx here is identifierinformation that is appended to a volume in a space, and a differentvalue is assigned to each volume. An order of assigning volume idx maybe the same as an encoding order, and may also be different from theencoding order. For example, intra predictor 1309 uses an average valueof color information of voxels included in volume idx=0, which is aneighboring volume, as the predicted value of the color information ofthe encoding target volume shown in FIG. 44. In this case, a predictionresidual is generated by deducting the predicted value of the colorinformation from the color information of each voxel included in theencoding target volume. The following processes are performed bytransformer 1303 and subsequent processors with respect to thisprediction residual. In this case, three-dimensional data encodingdevice 1300 appends, to the bitstream, neighboring volume informationand prediction mode information. The neighboring volume information hereis information indicating a neighboring volume used in the prediction,and indicates, for example, volume idx of the neighboring volume used inthe prediction. The prediction mode information here indicates a modeused to generate the predicted volume. The mode is, for example, anaverage value mode in which the predicted value is generated using anaverage value of the voxels in the neighboring volume, or a median modein which the predicted value is generated using the median of the voxelsin the neighboring volume.

Intra predictor 1309 may generate the predicted volume using a pluralityof neighboring volumes. For example, in the structure shown in FIG. 44,intra predictor 1309 generates predicted volume 0 using a volume withvolume idx=0, and generates predicted volume 1 using a volume withvolume idx=1. Intra predictor 1309 then generates an average ofpredicted volume 0 and predicted volume 1 as a final predicted volume.In this case, three-dimensional data encoding device 1300 may append, tothe bitstream, a plurality of volumes idx of a plurality of volumes usedto generate the predicted volume.

FIG. 45 is a diagram schematically showing the inter prediction processaccording to the present embodiment. Inter predictor 1311 encodes (interpredicts) a space (SPC) associated with certain time T_Cur using anencoded space associated with different time T_LX. In this case, interpredictor 1311 performs an encoding process by applying a rotation andtranslation process to the encoded space associated with different timeT_LX.

Three-dimensional data encoding device 1300 appends, to the bitstream,RT information relating to a rotation and translation process suited tothe space associated with different time T_LX. Different time T_LX is,for example, time T_L0 before certain time T_Cur. At this point,three-dimensional data encoding device 1300 may append, to thebitstream, RT information RT_L0 relating to a rotation and translationprocess suited to a space associated with time T_L0.

Alternatively, different time T_LX is, for example, time T_L1 aftercertain time T_Cur. At this point, three-dimensional data encodingdevice 1300 may append, to the bitstream, RT information RT_L1 relatingto a rotation and translation process suited to a space associated withtime T_L1.

Alternatively, inter predictor 1311 encodes (bidirectional prediction)with reference to the spaces associated with time T_L0 and time T_L1that differ from each other. In this case, three-dimensional dataencoding device 1300 may append, to the bitstream, both RT informationRT_L0 and RT information RT_L1 relating to the rotation and translationprocess suited to the spaces thereof.

Note that T_L0 has been described as being before T_Cur and T_L1 asbeing after T_Cur, but are not necessarily limited thereto. For example,T_L0 and T_L1 may both be before T_Cur. T_L0 and T_L1 may also both beafter T_Cur.

Three-dimensional data encoding device 1300 may append, to thebitstream, RT information relating to a rotation and translation processsuited to spaces associated with different times, when encoding withreference to each of the spaces. For example, three-dimensional dataencoding device 1300 manages a plurality of encoded spaces to bereferred to, using two reference lists (list L0 and list L1). When afirst reference space in list L0 is L0R0, a second reference space inlist L0 is L0R1, a first reference space in list L1 is L1R0, and asecond reference space in list L1 is L1R1, three-dimensional dataencoding device 1300 appends, to the bitstream, RT information RT_L0R0of L0R0, RT information RT_L0R1 of L0R1, RT information RT_L1R0 of L1R0,and RT information RT_L1R1 of L1R1. For example, three-dimensional dataencoding device 1300 appends these pieces of RT information to a headerand the like of the bitstream.

Three-dimensional data encoding device 1300 determines whether to applyrotation and translation per reference space, when encoding withreference to reference spaces associated with different times. In thiscase, three-dimensional data encoding device 1300 may append, to headerinformation and the like of the bitstream, information (RT flag, etc.)indicating whether rotation and translation are applied per referencespace. For example, three-dimensional data encoding device 1300calculates the RT information and an Iterative Closest Point (ICP) errorvalue, using an ICP algorithm per reference space to be referred to fromthe encoding target space. Three-dimensional data encoding device 1300determines that rotation and translation do not need to be performed andsets the RT flag to OFF, when the ICP error value is lower than or equalto a predetermined fixed value. In contrast, three-dimensional dataencoding device 1300 sets the RT flag to ON and appends the RTinformation to the bitstream, when the ICP error value exceeds the abovefixed value.

FIG. 46 is a diagram showing an example syntax to be appended to aheader of the RT information and the RT flag. Note that a bit countassigned to each syntax may be decided based on a range of this syntax.For example, when eight reference spaces are included in reference listL0, 3 bits may be assigned to MaxRefSpc_l0. The bit count to be assignedmay be variable in accordance with a value each syntax can be, and mayalso be fixed regardless of the value each syntax can be. When the bitcount to be assigned is fixed, three-dimensional data encoding device1300 may append this fixed bit count to other header information.

MaxRefSpc_l0 shown in FIG. 46 indicates a number of reference spacesincluded in reference list L0. RT_flag_l0[i] is an RT flag of referencespace i in reference list L0. When RT_flag_l0[i] is 1, rotation andtranslation are applied to reference space i. When RT_flag_l0[i] is 0,rotation and translation are not applied to reference space i.

R_l0[i] and T_l0[i] are RT information of reference space i in referencelist L0. R_l0[i] is rotation information of reference space i inreference list L0. The rotation information indicates contents of theapplied rotation process, and is, for example, a rotation matrix or aquaternion. T_l0[i] is translation information of reference space i inreference list L0. The translation information indicates contents of theapplied translation process, and is, for example, a translation vector.

MaxRefSpc_l1 indicates a number of reference spaces included inreference list L1. RT_flag_l1[i] is an RT flag of reference space i inreference list L1. When RT_flag_l1[i] is 1, rotation and translation areapplied to reference space i. When RT_flag_l1[i] is 0, rotation andtranslation are not applied to reference space i.

R_l1[i] and T_l1[i] are RT information of reference space i in referencelist L1. R_l1[i] is rotation information of reference space i inreference list L1. The rotation information indicates contents of theapplied rotation process, and is, for example, a rotation matrix or aquaternion. T_l1[i] is translation information of reference space i inreference list L1. The translation information indicates contents of theapplied translation process, and is, for example, a translation vector.

Inter predictor 1311 generates the predicted volume of the encodingtarget volume using information on an encoded reference space stored inreference space memory 1310. As stated above, before generating thepredicted volume of the encoding target volume, inter predictor 1311calculates RT information at an encoding target space and a referencespace using an ICP algorithm, in order to approach an overall positionalrelationship between the encoding target space and the reference space.Inter predictor 1311 then obtains reference space B by applying arotation and translation process to the reference space using thecalculated RT information. Subsequently, inter predictor 1311 generatesthe predicted volume of the encoding target volume in the encodingtarget space using information in reference space B. Three-dimensionaldata encoding device 1300 appends, to header information and the like ofthe encoding target space, the RT information used to obtain referencespace B.

In this manner, inter predictor 1311 is capable of improving precisionof the predicted volume by generating the predicted volume using theinformation of the reference space, after approaching the overallpositional relationship between the encoding target space and thereference space, by applying a rotation and translation process to thereference space. It is possible to reduce the code amount since it ispossible to limit the prediction residual. Note that an example has beendescribed in which ICP is performed using the encoding target space andthe reference space, but is not necessarily limited thereto. Forexample, inter predictor 1311 may calculate the RT information byperforming ICP using at least one of (i) an encoding target space inwhich a voxel or point cloud count is pruned, or (ii) a reference spacein which a voxel or point cloud count is pruned, in order to reduce theprocessing amount.

When the ICP error value obtained as a result of the ICP is smaller thana predetermined first threshold, i.e., when for example the positionalrelationship between the encoding target space and the reference spaceis similar, inter predictor 1311 determines that a rotation andtranslation process is not necessary, and the rotation and translationprocess does not need to be performed. In this case, three-dimensionaldata encoding device 1300 may control the overhead by not appending theRT information to the bitstream.

When the ICP error value is greater than a predetermined secondthreshold, inter predictor 1311 determines that a shape change betweenthe spaces is large, and intra prediction may be applied on all volumesof the encoding target space. Hereinafter, spaces to which intraprediction is applied will be referred to as intra spaces. The secondthreshold is greater than the above first threshold. The presentembodiment is not limited to ICP, and any type of method may be used aslong as the method calculates the RT information using two voxel sets ortwo point cloud sets.

When attribute information, e.g. shape or color information, is includedin the three-dimensional data, inter predictor 1311 searches, forexample, a volume whose attribute information, e.g. shape or colorinformation, is the most similar to the encoding target volume in thereference space, as the predicted volume of the encoding target volumein the encoding target space. This reference space is, for example, areference space on which the above rotation and translation process hasbeen performed. Inter predictor 1311 generates the predicted volumeusing the volume (reference volume) obtained through the search. FIG. 47is a diagram for describing a generating operation of the predictedvolume. When encoding the encoding target volume (volume idx=0) shown inFIG. 47 using inter prediction, inter predictor 1311 searches a volumewith a smallest prediction residual, which is the difference between theencoding target volume and the reference volume, while sequentiallyscanning the reference volume in the reference space. Inter predictor1311 selects the volume with the smallest prediction residual as thepredicted volume. The prediction residuals of the encoding target volumeand the predicted volume are encoded through the processes performed bytransformer 1303 and subsequent processors. The prediction residual hereis a difference between the attribute information of the encoding targetvolume and the attribute information of the predicted volume.Three-dimensional data encoding device 1300 appends, to the header andthe like of the bitstream, volume idx of the reference volume in thereference space, as the predicted volume.

In the example shown in FIG. 47, the reference volume with volume idx=4of reference space L0R0 is selected as the predicted volume of theencoding target volume. The prediction residuals of the encoding targetvolume and the reference volume, and reference volume idx=4 are thenencoded and appended to the bitstream.

Note that an example has been described in which the predicted volume ofthe attribute information is generated, but the same process may beapplied to the predicted volume of the position information.

Prediction controller 1312 controls whether to encode the encodingtarget volume using intra prediction or inter prediction. A modeincluding intra prediction and inter prediction is referred to here as aprediction mode. For example, prediction controller 1312 calculates theprediction residual when the encoding target volume is predicted usingintra prediction and the prediction residual when the encoding targetvolume is predicted using inter prediction as evaluation values, andselects the prediction mode whose evaluation value is smaller. Note thatprediction controller 1312 may calculate an actual code amount byapplying orthogonal transformation, quantization, and entropy encodingto the prediction residual of the intra prediction and the predictionresidual of the inter prediction, and select a prediction mode using thecalculated code amount as the evaluation value. Overhead information(reference volume idx information, etc.) aside from the predictionresidual may be added to the evaluation value. Prediction controller1312 may continuously select intra prediction when it has been decidedin advance to encode the encoding target space using intra space.

Entropy encoder 1313 generates an encoded signal (encoded bitstream) byvariable-length encoding the quantized coefficient, which is an inputfrom quantizer 1304. To be specific, entropy encoder 1313, for example,binarizes the quantized coefficient and arithmetically encodes theobtained binary signal.

A three-dimensional data decoding device that decodes the encoded signalgenerated by three-dimensional data encoding device 1300 will bedescribed next. FIG. 48 is a block diagram of three-dimensional datadecoding device 1400 according to the present embodiment. Thisthree-dimensional data decoding device 1400 includes entropy decoder1401, inverse quantizer 1402, inverse transformer 1403, adder 1404,reference volume memory 1405, intra predictor 1406, reference spacememory 1407, inter predictor 1408, and prediction controller 1409.

Entropy decoder 1401 variable-length decodes the encoded signal (encodedbitstream). For example, entropy decoder 1401 generates a binary signalby arithmetically decoding the encoded signal, and generates a quantizedcoefficient using the generated binary signal.

Inverse quantizer 1402 generates an inverse quantized coefficient byinverse quantizing the quantized coefficient inputted from entropydecoder 1401, using a quantization parameter appended to the bitstreamand the like.

Inverse transformer 1403 generates a prediction residual by inversetransforming the inverse quantized coefficient inputted from inversequantizer 1402. For example, inverse transformer 1403 generates theprediction residual by inverse orthogonally transforming the inversequantized coefficient, based on information appended to the bitstream.

Adder 1404 adds, to generate a reconstructed volume, (i) the predictionresidual generated by inverse transformer 1403 to (ii) a predictedvolume generated through intra prediction or intra prediction. Thisreconstructed volume is outputted as decoded three-dimensional data andis stored in reference volume memory 1405 or reference space memory1407.

Intra predictor 1406 generates a predicted volume through intraprediction using a reference volume in reference volume memory 1405 andinformation appended to the bitstream. To be specific, intra predictor1406 obtains neighboring volume information (e.g. volume idx) appendedto the bitstream and prediction mode information, and generates thepredicted volume through a mode indicated by the prediction modeinformation, using a neighboring volume indicated in the neighboringvolume information. Note that the specifics of these processes are thesame as the above-mentioned processes performed by intra predictor 1309,except for which information appended to the bitstream is used.

Inter predictor 1408 generates a predicted volume through interprediction using a reference space in reference space memory 1407 andinformation appended to the bitstream. To be specific, inter predictor1408 applies a rotation and translation process to the reference spaceusing the RT information per reference space appended to the bitstream,and generates the predicted volume using the rotated and translatedreference space. Note that when an RT flag is present in the bitstreamper reference space, inter predictor 1408 applies a rotation andtranslation process to the reference space in accordance with the RTflag. Note that the specifics of these processes are the same as theabove-mentioned processes performed by inter predictor 1311, except forwhich information appended to the bitstream is used.

Prediction controller 1409 controls whether to decode a decoding targetvolume using intra prediction or inter prediction. For example,prediction controller 1409 selects intra prediction or inter predictionin accordance with information that is appended to the bitstream andindicates the prediction mode to be used. Note that predictioncontroller 1409 may continuously select intra prediction when it hasbeen decided in advance to decode the decoding target space using intraspace.

Hereinafter, variations of the present embodiment will be described. Inthe present embodiment, an example has been described in which rotationand translation is applied in units of spaces, but rotation andtranslation may also be applied in smaller units. For example,three-dimensional data encoding device 1300 may divide a space intosubspaces, and apply rotation and translation in units of subspaces. Inthis case, three-dimensional data encoding device 1300 generates RTinformation per subspace, and appends the generated RT information to aheader and the like of the bitstream. Three-dimensional data encodingdevice 1300 may apply rotation and translation in units of volumes,which is an encoding unit. In this case, three-dimensional data encodingdevice 1300 generates RT information in units of encoded volumes, andappends the generated RT information to a header and the like of thebitstream. The above may also be combined. In other words,three-dimensional data encoding device 1300 may apply rotation andtranslation in large units and subsequently apply rotation andtranslation in small units. For example, three-dimensional data encodingdevice 1300 may apply rotation and translation in units of spaces, andmay also apply different rotations and translations to each of aplurality of volumes included in the obtained spaces.

In the present embodiment, an example has been described in whichrotation and translation is applied to the reference space, but is notnecessarily limited thereto. For example, three-dimensional dataencoding device 1300 may apply a scaling process and change a size ofthe three-dimensional data. Three-dimensional data encoding device 1300may also apply one or two of the rotation, translation, and scaling.When applying the processes in multiple stages and different units asstated above, a type of the processes applied in each unit may differ.For example, rotation and translation may be applied in units of spaces,and translation may be applied in units of volumes.

Note that these variations are also applicable to three-dimensional datadecoding device 1400.

As stated above, three-dimensional data encoding device 1300 accordingto the present embodiment performs the following processes. FIG. 48 is aflowchart of the inter prediction process performed by three-dimensionaldata encoding device 1300.

Three-dimensional data encoding device 1300 generates predicted positioninformation (e.g. predicted volume) using position information onthree-dimensional points included in three-dimensional reference data(e.g. reference space) associated with a time different from a timeassociated with current three-dimensional data (e.g. encoding targetspace) (S1301). To be specific, three-dimensional data encoding device1300 generates the predicted position information by applying a rotationand translation process to the position information on thethree-dimensional points included in the three-dimensional referencedata.

Note that three-dimensional data encoding device 1300 may perform arotation and translation process using a first unit (e.g. spaces), andmay perform the generating of the predicted position information using asecond unit (e.g. volumes) that is smaller than the first unit. Forexample, three-dimensional data encoding device 1300 searches a volumeamong a plurality of volumes included in the rotated and translatedreference space, whose position information differs the least from theposition information of the encoding target volume included in theencoding target space. Note that three-dimensional data encoding device1300 may perform the rotation and translation process, and thegenerating of the predicted position information in the same unit.

Three-dimensional data encoding device 1300 may generate the predictedposition information by applying (i) a first rotation and translationprocess to the position information on the three-dimensional pointsincluded in the three-dimensional reference data, and (ii) a secondrotation and translation process to the position information on thethree-dimensional points obtained through the first rotation andtranslation process, the first rotation and translation process using afirst unit (e.g. spaces) and the second rotation and translation processusing a second unit (e.g. volumes) that is smaller than the first unit.

For example, as illustrated in FIG. 41, the position information on thethree-dimensional points and the predicted position information isrepresented using an octree structure. For example, the positioninformation on the three-dimensional points and the predicted positioninformation is expressed in a scan order that prioritizes a breadth overa depth in the octree structure. For example, the position informationon the three-dimensional points and the predicted position informationis expressed in a scan order that prioritizes a depth over a breadth inthe octree structure.

As illustrated in FIG. 46, three-dimensional data encoding device 1300encodes an RT flag that indicates whether to apply the rotation andtranslation process to the position information on the three-dimensionalpoints included in the three-dimensional reference data. In other words,three-dimensional data encoding device 1300 generates the encoded signal(encoded bitstream) including the RT flag. Three-dimensional dataencoding device 1300 encodes RT information that indicates contents ofthe rotation and translation process. In other words, three-dimensionaldata encoding device 1300 generates the encoded signal (encodedbitstream) including the RT information. Note that three-dimensionaldata encoding device 1300 may encode the RT information when the RT flagindicates to apply the rotation and translation process, and does notneed to encode the RT information when the RT flag indicates not toapply the rotation and translation process.

The three-dimensional data includes, for example, the positioninformation on the three-dimensional points and the attributeinformation (color information, etc.) of each three-dimensional point.Three-dimensional data encoding device 1300 generates predictedattribute information using the attribute information of thethree-dimensional points included in the three-dimensional referencedata (S1302).

Three-dimensional data encoding device 1300 next encodes the positioninformation on the three-dimensional points included in the currentthree-dimensional data, using the predicted position information. Forexample, as illustrated in FIG. 38, three-dimensional data encodingdevice 1300 calculates differential position information, thedifferential position information being a difference between thepredicted position information and the position information on thethree-dimensional points included in the current three-dimensional data(S1303).

Three-dimensional data encoding device 1300 encodes the attributeinformation of the three-dimensional points included in the currentthree-dimensional data, using the predicted attribute information. Forexample, three-dimensional data encoding device 1300 calculatesdifferential attribute information, the differential attributeinformation being a difference between the predicted attributeinformation and the attribute information on the three-dimensionalpoints included in the current three-dimensional data (S1304).Three-dimensional data encoding device 1300 next performs transformationand quantization on the calculated differential attribute information(S1305).

Lastly, three-dimensional data encoding device 1300 encodes (e.g.entropy encodes) the differential position information and the quantizeddifferential attribute information (S1036). In other words,three-dimensional data encoding device 1300 generates the encoded signal(encoded bitstream) including the differential position information andthe differential attribute information.

Note that when the attribute information is not included in thethree-dimensional data, three-dimensional data encoding device 1300 doesnot need to perform steps S1302, S1304, and S1305. Three-dimensionaldata encoding device 1300 may also perform only one of the encoding ofthe position information on the three-dimensional points and theencoding of the attribute information of the three-dimensional points.

An order of the processes shown in FIG. 49 is merely an example and isnot limited thereto. For example, since the processes with respect tothe position information (S1301 and S1303) and the processes withrespect to the attribute information (S1302, S1304, and S1305) areseparate from one another, they may be performed in an order of choice,and a portion thereof may also be performed in parallel.

With the above, three-dimensional data encoding device 1300 according tothe present embodiment generates predicted position information usingposition information on three-dimensional points included inthree-dimensional reference data associated with a time different from atime associated with current three-dimensional data; and encodesdifferential position information, which is a difference between thepredicted position information and the position information on thethree-dimensional points included in the current three-dimensional data.This makes it possible to improve encoding efficiency since it ispossible to reduce the amount of data of the encoded signal.

Three-dimensional data encoding device 1300 according to the presentembodiment generates predicted attribute information using attributeinformation on three-dimensional points included in three-dimensionalreference data; and encodes differential attribute information, which isa difference between the predicted attribute information and theattribute information on the three-dimensional points included in thecurrent three-dimensional data. This makes it possible to improveencoding efficiency since it is possible to reduce the amount of data ofthe encoded signal.

For example, three-dimensional data encoding device 1300 includes aprocessor and memory. The processor uses the memory to perform the aboveprocesses.

FIG. 48 is a flowchart of the inter prediction process performed bythree-dimensional data decoding device 1400.

Three-dimensional data decoding device 1400 decodes (e.g. entropydecodes) the differential position information and the differentialattribute information from the encoded signal (encoded bitstream)(S1401).

Three-dimensional data decoding device 1400 decodes, from the encodedsignal, an RT flag that indicates whether to apply the rotation andtranslation process to the position information on the three-dimensionalpoints included in the three-dimensional reference data.Three-dimensional data decoding device 1400 encodes RT information thatindicates contents of the rotation and translation process. Note thatthree-dimensional data decoding device 1400 may decode the RTinformation when the RT flag indicates to apply the rotation andtranslation process, and does not need to decode the RT information whenthe RT flag indicates not to apply the rotation and translation process.

Three-dimensional data decoding device 1400 next performs inversetransformation and inverse quantization on the decoded differentialattribute information (S1402).

Three-dimensional data decoding device 1400 next generates predictedposition information (e.g. predicted volume) using the positioninformation on the three-dimensional points included in thethree-dimensional reference data (e.g. reference space) associated witha time different from a time associated with the currentthree-dimensional data (e.g. decoding target space) (S1403). To bespecific, three-dimensional data decoding device 1400 generates thepredicted position information by applying a rotation and translationprocess to the position information on the three-dimensional pointsincluded in the three-dimensional reference data.

More specifically, when the RT flag indicates to apply the rotation andtranslation process, three-dimensional data decoding device 1400 appliesthe rotation and translation process on the position information on thethree-dimensional points included in the three-dimensional referencedata indicated in the RT information. In contrast, when the RT flagindicates not to apply the rotation and translation process,three-dimensional data decoding device 1400 does not apply the rotationand translation process on the position information on thethree-dimensional points included in the three-dimensional referencedata.

Note that three-dimensional data decoding device 1400 may perform therotation and translation process using a first unit (e.g. spaces), andmay perform the generating of the predicted position information using asecond unit (e.g. volumes) that is smaller than the first unit. Notethat three-dimensional data decoding device 1400 may perform therotation and translation process, and the generating of the predictedposition information in the same unit.

Three-dimensional data decoding device 1400 may generate the predictedposition information by applying (i) a first rotation and translationprocess to the position information on the three-dimensional pointsincluded in the three-dimensional reference data, and (ii) a secondrotation and translation process to the position information on thethree-dimensional points obtained through the first rotation andtranslation process, the first rotation and translation process using afirst unit (e.g. spaces) and the second rotation and translation processusing a second unit (e.g. volumes) that is smaller than the first unit.

For example, as illustrated in FIG. 41, the position information on thethree-dimensional points and the predicted position information isrepresented using an octree structure. For example, the positioninformation on the three-dimensional points and the predicted positioninformation is expressed in a scan order that prioritizes a breadth overa depth in the octree structure. For example, the position informationon the three-dimensional points and the predicted position informationis expressed in a scan order that prioritizes a depth over a breadth inthe octree structure.

Three-dimensional data decoding device 1400 generates predictedattribute information using the attribute information of thethree-dimensional points included in the three-dimensional referencedata (S1404).

Three-dimensional data decoding device 1400 next restores the positioninformation on the three-dimensional points included in the currentthree-dimensional data, by decoding encoded position informationincluded in an encoded signal, using the predicted position information.The encoded position information here is the differential positioninformation. Three-dimensional data decoding device 1400 restores theposition information on the three-dimensional points included in thecurrent three-dimensional data, by adding the differential positioninformation to the predicted position information (S1405).

Three-dimensional data decoding device 1400 restores the attributeinformation of the three-dimensional points included in the currentthree-dimensional data, by decoding encoded attribute informationincluded in an encoded signal, using the predicted attributeinformation. The encoded attribute information here is the differentialposition information. Three-dimensional data decoding device 1400restores the attribute information on the three-dimensional pointsincluded in the current three-dimensional data, by adding thedifferential attribute information to the predicted attributeinformation (S1406).

Note that when the attribute information is not included in thethree-dimensional data, three-dimensional data decoding device 1400 doesnot need to perform steps S1402, S1404, and S1406. Three-dimensionaldata decoding device 1400 may also perform only one of the decoding ofthe position information on the three-dimensional points and thedecoding of the attribute information of the three-dimensional points.

An order of the processes shown in FIG. 50 is merely an example and isnot limited thereto. For example, since the processes with respect tothe position information (S1403 and S1405) and the processes withrespect to the attribute information (S1402, S1404, and S1406) areseparate from one another, they may be performed in an order of choice,and a portion thereof may also be performed in parallel.

Embodiment 8

Information of a three-dimensional point cloud includes geometryinformation (geometry) and attribute information (attribute). Geometryinformation includes coordinates (x-coordinate, y-coordinate,z-coordinate) with respect to a certain point. When geometry informationis encoded, a method of representing the position of each ofthree-dimensional points in octree representation and encoding theoctree information to reduce a code amount is used instead of directlyencoding the coordinates of the three-dimensional point.

On the other hand, attribute information includes informationindicating, for example, color information (RGB, YUV, etc.) of eachthree-dimensional point, a reflectance, and a normal vector. Forexample, a three-dimensional data encoding device is capable of encodingattribute information using an encoding method different from a methodused to encode geometry information.

In the present embodiment, a method of encoding attribute information isexplained. It is to be noted that, in the present embodiment, the methodis explained based on an example case using integer values as values ofattribute information. For example, when each of RGB or YUV colorcomponents is of an 8-bit accuracy, the color component is an integervalue in a range from 0 to 255. When a reflectance value is of 10-bitaccuracy, the reflectance value is an integer in a range from 0 to 1023.It is to be noted that, when the bit accuracy of attribute informationis a decimal accuracy, the three-dimensional data encoding device maymultiply the value by a scale value to round it to an integer value sothat the value of the attribute information becomes an integer value. Itis to be noted that the three-dimensional data encoding device may addthe scale value to, for example, a header of a bitstream.

As a method of encoding attribute information of a three-dimensionalpoint, it is conceivable to calculate a predicted value of the attributeinformation of the three-dimensional point and encode a difference(prediction residual) between the original value of the attributeinformation and the predicted value. For example, when the value ofattribute information at three-dimensional point p is Ap and a predictedvalue is Pp, the three-dimensional data encoding device encodesdifferential absolute value Diffp=|Ap·Pp|. In this case, whenhighly-accurate predicted value Pp can be generated, differentialabsolute value Diffp is small. Thus, for example, it is possible toreduce the code amount by entropy encoding differential absolute valueDiffp using a coding table that reduces an occurrence bit count morewhen differential absolute value Diffp is smaller.

As a method of generating a prediction value of attribute information,it is conceivable to use attribute information of a referencethree-dimensional point that is another three-dimensional point whichneighbors a current three-dimensional point to be encoded. Here, areference three-dimensional point is a three-dimensional point in arange of a predetermined distance from the current three-dimensionalpoint. For example, when there are current three-dimensional pointp=(x1, y1, z1) and three-dimensional point q=(x2, y2, z2), thethree-dimensional data encoding device calculates Euclidean distance d(p, q) between three-dimensional point p and three-dimensional point qrepresented by (Equation A1).

[Math. 1]

d(p,q)=√{square root over ((x1−y1)²+(x2−y2)²+(x3−y3)²)}  (Equation A1)

The three-dimensional data encoding device determines that the positionof three-dimensional point q is closer to the position of currentthree-dimensional point p when Euclidean distance d (p, q) is smallerthan predetermined threshold value THd, and determines to use the valueof the attribute information of three-dimensional point q to generate apredicted value of the attribute information of currentthree-dimensional point p. It is to be noted that the method ofcalculating the distance may be another method, and a Mahalanobisdistance or the like may be used. In addition, the three-dimensionaldata encoding device may determine not to use, in prediction processing,any three-dimensional point outside the predetermined range of distancefrom the current three-dimensional point. For example, whenthree-dimensional point r is present, and distance d (p, r) betweencurrent three-dimensional point p and three-dimensional point r islarger than or equal to threshold value THd, the three-dimensional dataencoding device may determine not to use three-dimensional point r forprediction. It is to be noted that the three-dimensional data encodingdevice may add the information indicating threshold value THd to, forexample, a header of a bitstream.

FIG. 51 is a diagram illustrating an example of three-dimensionalpoints. In this example, distance d (p, q) between currentthree-dimensional point p and three-dimensional point q is smaller thanthreshold value THd. Thus, the three-dimensional data encoding devicedetermines that three-dimensional point q is a referencethree-dimensional point of current three-dimensional point p, anddetermines to use the value of attribute information Aq ofthree-dimensional point q to generate predicted value Pp of attributeinformation Ap of current three-dimensional point p.

In contrast, distance d (p, r) between current three-dimensional point pand three-dimensional point r is larger than or equal to threshold valueTHd. Thus, the three-dimensional data encoding device determines thatthree-dimensional point r is not any reference three-dimensional pointof current three-dimensional point p, and determines not to use thevalue of attribute information Ar of three-dimensional point r togenerate predicted value Pp of attribute information Ap of currentthree-dimensional point p.

In addition, when encoding the attribute information of the currentthree-dimensional point using a predicted value, the three-dimensionaldata encoding device uses a three-dimensional point whose attributeinformation has already been encoded and decoded, as a referencethree-dimensional point. Likewise, when decoding the attributeinformation of a current three-dimensional point to be decoded, thethree-dimensional data decoding device uses a three-dimensional pointwhose attribute information has already been decoded, as a referencethree-dimensional point. In this way, it is possible to generate thesame predicted value at the time of encoding and decoding. Thus, abitstream of the three-dimensional point generated by the encoding canbe decoded correctly at the decoding side.

Furthermore, when encoding attribute information of each ofthree-dimensional points, it is conceivable to classify thethree-dimensional point into one of a plurality of layers using geometryinformation of the three-dimensional point and then encode the attributeinformation. Here, each of the layers classified is referred to as aLevel of Detail (LoD). A method of generating LoDs is explained withreference to FIG. 52.

First, the three-dimensional data encoding device selects initial pointa0 and assigns initial point a0 to LoD0. Next, the three-dimensionaldata encoding device extracts point a1 distant from point a0 more thanthreshold value Thres_LoD[0] of LoD0 and assigns point a1 to LoD0. Next,the three-dimensional data encoding device extracts point a2 distantfrom point a1 more than threshold value Thres_LoD[0] of LoD0 and assignspoint a2 to LoD0. In this way, the three-dimensional data encodingdevice configures LoD0 in such a manner that the distance between thepoints in LoD0 is larger than threshold value Thres_LoD[0].

Next, the three-dimensional data encoding device selects point b0 whichhas not yet been assigned to any LoD and assigns point b0 to LoD1. Next,the three-dimensional data encoding device extracts point b1 which isdistant from point b0 more than threshold value Thres_LoD[1] of LoD1 andwhich has not yet been assigned to any LoD, and assigns point b1 toLoD1. Next, the three-dimensional data encoding device extracts point b2which is distant from point b1 more than threshold value Thres_LoD[1] ofLoD1 and which has not yet been assigned to any LoD, and assigns pointb2 to LoD1. In this way, the three-dimensional data encoding deviceconfigures LoD1 in such a manner that the distance between the points inLoD1 is larger than threshold value Thres_LoD[1].

Next, the three-dimensional data encoding device selects point c0 whichhas not yet been assigned to any LoD and assigns point c0 to LoD2. Next,the three-dimensional data encoding device extracts point c1 which isdistant from point c0 more than threshold value Thres_LoD[2] of LoD2 andwhich has not yet been assigned to any LoD, and assigns point c1 toLoD2. Next, the three-dimensional data encoding device extracts point c2which is distant from point c1 more than threshold value Thres_LoD[2] ofLoD2 and which has not yet been assigned to any LoD, and assigns pointc2 to LoD2. In this way, the three-dimensional data encoding deviceconfigures LoD2 in such a manner that the distance between the points inLoD2 is larger than threshold value Thres_LoD[2]. For example, asillustrated in FIG. 53, threshold values Thres_LoD[0], Thres_LoD[1], andThres_LoD[2] of respective LoDs are set.

In addition, the three-dimensional data encoding device may add theinformation indicating the threshold value of each LoD to, for example,a header of a bitstream. For example, in the case of the exampleillustrated in FIG. 53, the three-dimensional data encoding device mayadd threshold values Thres_LoD[0], Thres_LoD[1], and Thres_LoD[2] ofrespective LoDs to a header.

Alternatively, the three-dimensional data encoding device may assign allthree-dimensional points which have not yet been assigned to any LoD inthe lowermost-layer LoD. In this case, the three-dimensional dataencoding device is capable of reducing the code amount of the header bynot assigning the threshold value of the lowermost-layer LoD to theheader. For example, in the case of the example illustrated in FIG. 53,the three-dimensional data encoding device assigns threshold valuesThres_LoD[0] and Thres_LoD[1] to the header, and does not assignThres_LoD[2] to the header. In this case, the three-dimensional dataencoding device may estimate value 0 of Thres_LoD[2]. In addition, thethree-dimensional data encoding device may add the number of LoDs to aheader. In this way, the three-dimensional data encoding device iscapable of determining the lowermost-layer LoD using the number of LoDs.

In addition, setting threshold values for the respective layers LoDs insuch a manner that a larger threshold value is set to a higher layer, asillustrated in FIG. 53, makes a higher layer (layer closer to LoD0) tohave a sparse point cloud (sparse) in which three-dimensional points aremore distant and makes a lower layer to have a dense point cloud (dense)in which three-dimensional points are closer. It is to be noted that, inan example illustrated in FIG. 53, LoD0 is the uppermost layer.

In addition, the method of selecting an initial three-dimensional pointat the time of setting each LoD may depend on an encoding order at thetime of geometry information encoding. For example, thethree-dimensional data encoding device configures LoD0 by selecting thethree-dimensional point encoded first at the time of the geometryinformation encoding as initial point a0 of LoD0, and selecting point a1and point a2 from initial point a0 as the origin. The three-dimensionaldata encoding device then may select the three-dimensional point whosegeometry information has been encoded at the earliest time amongthree-dimensional points which do not belong to LoD0, as initial pointb0 of LoD1. In other words, the three-dimensional data encoding devicemay select the three-dimensional point whose geometry information hasbeen encoded at the earliest time among three-dimensional points whichdo not belong to layers (LoD0 to LoDn−1) above LoDn, as initial point n0of LoDn. In this way, the three-dimensional data encoding device iscapable of configuring the same LoD as in encoding by using, indecoding, the initial point selecting method similar to the one used inthe encoding, which enables appropriate decoding of a bitstream. Morespecifically, the three-dimensional data encoding device selects thethree-dimensional point whose geometry information has been decoded atthe earliest time among three-dimensional points which do not belong tolayers above LoDn, as initial point n0 of LoDn.

Hereinafter, a description is given of a method of generating thepredicted value of the attribute information of each three-dimensionalpoint using information of LoDs. For example, when encodingthree-dimensional points starting with the three-dimensional pointsincluded in LoD0, the three-dimensional data encoding device generatescurrent three-dimensional points which are included in LoD1 usingencoded and decoded (hereinafter also simply referred to as “encoded”)attribute information included in LoD0 and LoD1. In this way, thethree-dimensional data encoding device generates a predicted value ofattribute information of each three-dimensional point included in LoDnusing encoded attribute information included in LoDn′ (n′≤n). In otherwords, the three-dimensional data encoding device does not use attributeinformation of each of three-dimensional points included in any layerbelow LoDn to calculate a predicted value of attribute information ofeach of the three-dimensional points included in LoDn.

For example, the three-dimensional data encoding device calculates anaverage of attribute information of N or less three dimensional pointsamong encoded three-dimensional points surrounding a currentthree-dimensional point to be encoded, to generate a predicted value ofattribute information of the current three-dimensional point. Inaddition, the three-dimensional data encoding device may add value N to,for example, a header of a bitstream. It is to be noted that thethree-dimensional data encoding device may change value N for eachthree-dimensional point, and may add value N for each three-dimensionalpoint. This enables selection of appropriate N for eachthree-dimensional point, which makes it possible to increase theaccuracy of the predicted value. Accordingly, it is possible to reducethe prediction residual. Alternatively, the three-dimensional dataencoding device may add value N to a header of a bitstream, and may fixthe value indicating N in the bitstream. This eliminates the need toencode or decode value N for each three-dimensional point, which makesit possible to reduce the processing amount. In addition, thethree-dimensional data encoding device may encode the values of Nseparately for each LoD. In this way, it is possible to increase thecoding efficiency by selecting appropriate N for each LoD.

Alternatively, the three-dimensional data encoding device may calculatea predicted value of attribute information of three-dimensional pointbased on weighted average values of attribute information of encoded Nneighbor three-dimensional points. For example, the three-dimensionaldata encoding device calculates weights using distance informationbetween a current three-dimensional point and each of N neighborthree-dimensional points.

When encoding value N for each LoD, for example, the three-dimensionaldata encoding device sets larger value N to a higher layer LoD, and setssmaller value N to a lower layer LoD. The distance betweenthree-dimensional points belonging to a higher layer LoD is large, thereis a possibility that it is possible to increase the prediction accuracyby setting large value N, selecting a plurality of neighborthree-dimensional points, and averaging the values. Furthermore, thedistance between three-dimensional points belonging to a lower layer LoDis small, it is possible to perform efficient prediction while reducingthe processing amount of averaging by setting smaller value N.

FIG. 54 is a diagram illustrating an example of attribute information tobe used for predicted values. As described above, the predicted value ofpoint P included in LoDN is generated using encoded neighbor point P′included in LoDN′ (N′≤N). Here, neighbor point P′ is selected based onthe distance from point P. For example, the predicted value of attributeinformation of point b2 illustrated in FIG. 54 is generated usingattribute information of each of points a0, a1, b0, and b1.

Neighbor points to be selected vary depending on the values of Ndescribed above. For example, in the case of N=5, a0, a1, a2, b0, and b1are selected as neighbor points. In the case of N=4, a0, a1, a2, and b1are selected based on distance information.

The predicted value is calculated by distance-dependent weightedaveraging. For example, in the example illustrated in FIG. 54, predictedvalue a2p of point a2 is calculated by weighted averaging of attributeinformation of each of point a0 and a1, as represented by (Equation A2)and (Equation A3). It is to be noted that Ai is an attribute informationvalue of ai.

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 2} \right\rbrack & \; \\{{a\; 2\; p} = {\sum\limits_{i = 0}^{1}\; {w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu} {A2}} \right) \\{w_{i} = \frac{\frac{1}{d\left( {{a\; 2},{ai}} \right)}}{\sum_{j = 0}^{1}\frac{1}{d\left( {{a\; 2},{aj}} \right)}}} & \left( {{Equation}\mspace{14mu} {A3}} \right)\end{matrix}$

In addition, predicted value b2p of point b2 is calculated by weightedaveraging of attribute information of each of point a0, a1, a2, b0, andb1, as represented by (Equation A4) and (Equation A6). It is to be notedthat Bi is an attribute information value of bi.

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 3} \right\rbrack & \; \\{{b\; 2\; p} = {{\sum_{i = 0}^{2}{{wa}_{i} \times A_{i}}} + {\sum_{i = 0}^{1}{{wb}_{i} \times B_{i}}}}} & \left( {{Equation}\mspace{14mu} {A4}} \right) \\{{wa}_{i} = \frac{\frac{1}{d\left( {{b\; 2},{ai}} \right)}}{{\sum_{j = 0}^{2}\frac{1}{d\left( {{b\; 2},{aj}} \right)}} + {\sum_{j = 0}^{1}\frac{1}{d\left( {{b\; 2},{bj}} \right)}}}} & \left( {{Equation}\mspace{14mu} {A5}} \right) \\{{wb}_{i} = \frac{\frac{1}{d\left( {{b\; 2},{bi}} \right)}}{{\sum_{j = 0}^{2}\frac{1}{d\left( {{b\; 2},{aj}} \right)}} + {\sum_{j = 0}^{1}\frac{1}{d\left( {{b\; 2},{bj}} \right)}}}} & \left( {{Equation}\mspace{14mu} {A6}} \right)\end{matrix}$

In addition, the three-dimensional data encoding device may calculate adifference value (prediction residual) generated from the value ofattribute information of a three-dimensional point and neighbor points,and may quantize the calculated prediction residual. For example, thethree-dimensional data encoding device performs quantization by dividingthe prediction residual by a quantization scale (also referred to as aquantization step). In this case, an error (quantization error) whichmay be generated by quantization reduces as the quantization scale issmaller. In the other case where the quantization scale is larger, theresulting quantization error is larger.

It is to be noted that the three-dimensional data encoding device maychange the quantization scale to be used for each LoD. For example, thethree-dimensional data encoding device reduces the quantization scalemore for a higher layer, and increases the quantization scale more for alower layer. The value of attribute information of a three-dimensionalpoint belonging to a higher layer may be used as a predicted value ofattribute information of a three-dimensional point belonging to a lowerlayer. Thus, it is possible to increase the coding efficiency byreducing the quantization scale for the higher layer to reduce thequantization error that can be generated in the higher layer and toincrease the prediction accuracy of the predicted value. It is to benoted that the three-dimensional data encoding device may add thequantization scale to be used for each LoD to, for example, a header. Inthis way, the three-dimensional data encoding device can decode thequantization scale correctly thereby appropriately decoding thebitstream.

In addition, the three-dimensional data encoding device may convert asigned integer value (signed quantized value) which is a quantizedprediction residual into an unsigned integer value (unsigned quantizedvalue). This eliminates the need to consider occurrence of a negativeinteger when entropy encoding the prediction residual. It is to be notedthat the three-dimensional data encoding device does not always need toconvert a signed integer value into an unsigned integer value, and, forexample, that the three-dimensional data encoding device may entropyencode a sign bit separately.

The prediction residual is calculated by subtracting a prediction valuefrom the original value. For example, as represented by (Equation A7),prediction residual a2r of point a2 is calculated by subtractingpredicted value a2p of point a2 from value A2 of attribute informationof point a2. As represented by (Equation A8), prediction residual b2r ofpoint b2 is calculated by subtracting predicted value b2p of point b2from value B2 of attribute information of point b2.

a2r=A2−a2p  (Equation A7)

b2r=B2−b2p  (Equation A8)

In addition, the prediction residual is quantized by being divided by aQuantization Step (QS). For example, quantized value a2q of point a2 iscalculated according to (Equation A9). Quantized value b2q of point b2is calculated according to (Equation A10). Here, QS_LoD0 is a QS forLoD0, and QS_LoD1 is a QS for LoD1. In other words, a QS may be changedaccording to an LoD.

a2q=a2r/QS_LoD0  (Equation A9)

b2q=b2r/QS_LoD1  (Equation A10)

In addition, the three-dimensional data encoding device converts signedinteger values which are quantized values as indicated below intounsigned integer values as indicated below. When signed integer valuea2q is smaller than 0, the three-dimensional data encoding device setsunsigned integer value a2u to −1−(2×a2q). When signed integer value a2qis 0 or more, the three-dimensional data encoding device sets unsignedinteger value a2u to 2×a2q.

Likewise, when signed integer value b2q is smaller than 0, thethree-dimensional data encoding device sets unsigned integer value b2uto −1−(2×b2q). When signed integer value b2q is 0 or more, thethree-dimensional data encoding device sets unsigned integer value b2uto 2×b2q.

In addition, the three-dimensional data encoding device may encode thequantized prediction residual (unsigned integer value) by entropyencoding. For example, the three-dimensional data encoding device maybinarize the unsigned integer value and then apply binary arithmeticencoding to the binary value.

It is to be noted that, in this case, the three-dimensional dataencoding device may switch binarization methods according to the valueof a prediction residual. For example, when prediction residual pu issmaller than threshold value R_TH, the three-dimensional data encodingdevice binarizes prediction residual pu using a fixed bit count requiredfor representing threshold value R_TH. In addition, when predictionresidual pu is larger than or equal to threshold value R_TH, thethree-dimensional data encoding device binarizes the binary data ofthreshold value R_TH and the value of (pu−R_TH), usingexponential-Golomb coding, or the like.

For example, when threshold value R_TH is 63 and prediction residual puis smaller than 63, the three-dimensional data encoding device binarizesprediction residual pu using 6 bits. When prediction residual pu islarger than or equal to 63, the three-dimensional data encoding deviceperforms arithmetic encoding by binarizing the binary data (111111) ofthreshold value R_TH and (pu−63) using exponential-Golomb coding.

In a more specific example, when prediction residual pu is 32, thethree-dimensional data encoding device generates 6-bit binary data(100000), and arithmetic encodes the bit sequence. In addition, whenprediction residual pu is 66, the three-dimensional data encoding devicegenerates binary data (111111) of threshold value R_TH and a bitsequence (00100) representing value 3 (66-63) using exponential-Golombcoding, and arithmetic encodes the bit sequence (111111+00100).

In this way, the three-dimensional data encoding device can performencoding while preventing a binary bit count from increasing abruptly inthe case where a prediction residual becomes large by switchingbinarization methods according to the magnitude of the predictionresidual. It is to be noted that the three-dimensional data encodingdevice may add threshold value R_TH to, for example, a header of abitstream.

For example, in the case where encoding is performed at a high bit rate,that is, when a quantization scale is small, a small quantization errorand a high prediction accuracy are obtained. As a result, a predictionresidual may not be large. Thus, in this case, the three-dimensionaldata encoding device sets large threshold value R_TH. This reduces thepossibility that the binary data of threshold value R_TH is encoded,which increases the coding efficiency. In the opposite case whereencoding is performed at a low bit rate, that is, when a quantizationscale is large, a large quantization error and a low prediction accuracyare obtained. As a result, a prediction residual may be large. Thus, inthis case, the three-dimensional data encoding device sets smallthreshold value R_TH. In this way, it is possible to prevent abruptincrease in bit length of binary data.

In addition, the three-dimensional data encoding device may switchthreshold value R_TH for each LoD, and may add threshold value R_TH foreach LoD to, for example, a header. In other words, thethree-dimensional data encoding device may switch binarization methodsfor each LoD. For example, since distances between three-dimensionalpoints are large in a higher layer, a prediction accuracy is low, whichmay increase a prediction residual. Thus, the three-dimensional dataencoding device prevents abrupt increase in bit length of binary data bysetting small threshold value R_TH to the higher layer. In addition,since distances between three-dimensional points are small in a lowerlayer, a prediction accuracy is high, which may reduce a predictionresidual. Thus, the three-dimensional data encoding device increases thecoding efficiency by setting large threshold value R_TH to the lowerlayer.

FIG. 55 is a diagram indicating examples of exponential-Golomb codes.The diagram indicates the relationships between pre-binarization values(non-binary values) and post-binarization bits (codes). It is to benoted that 0 and 1 indicated in FIG. 55 may be inverted.

The three-dimensional data encoding device applies arithmetic encodingto the binary data of prediction residuals. In this way, the codingefficiency can be increased. It is to be noted that, in the applicationof the arithmetic encoding, there is a possibility that occurrenceprobability tendencies of 0 and 1 in each bit vary, in binary data,between an n-bit code which is a part binarized by n bits and aremaining code which is a part binarized using exponential-Golombcoding. Thus, the three-dimensional data encoding device may switchmethods of applying arithmetic encoding between the n-bit code and theremaining code.

For example, the three-dimensional data encoding device performsarithmetic encoding on the n-bit code using one or more coding tables(probability tables) different for each bit. At this time, thethree-dimensional data encoding device may change the number of codingtables to be used for each bit. For example, the three-dimensional dataencoding device performs arithmetic encoding using one coding table forfirst bit b0 in an n-bit code. The three-dimensional data encodingdevice uses two coding tables for next bit b1. The three-dimensionaldata encoding device switches coding tables to be used for arithmeticencoding of bit b1 according to the value (0 or 1) of b0. Likewise, thethree-dimensional data encoding device uses four coding tables for nextbit b2. The three-dimensional data encoding device switches codingtables to be used for arithmetic encoding of bit b2 according to thevalues (in a range from 0 to 3) of b0 and b1.

In this way the three-dimensional data encoding device uses 2n−1 codingtables when arithmetic encoding each bit bn−1 in n-bit code. Thethree-dimensional data encoding device switches coding tables to be usedaccording to the values (occurrence patterns) of bits before bn−1. Inthis way, the three-dimensional data encoding device can use codingtables appropriate for each bit, and thus can increase the codingefficiency.

It is to be noted that the three-dimensional data encoding device mayreduce the number of coding tables to be used for each bit. For example,the three-dimensional data encoding device may switch 2m coding tablesaccording to the values (occurrence patterns) of m bits (m<n−1) beforebn−1 when arithmetic encoding each bit bn−1. In this way, it is possibleto increase the coding efficiency while reducing the number of codingtables to be used for each bit. It is to be noted that thethree-dimensional data encoding device may update the occurrenceprobabilities of 0 and 1 in each coding table according to the values ofbinary data occurred actually. In addition, the three-dimensional dataencoding device may fix the occurrence probabilities of 0 and 1 incoding tables for some bit(s). In this way it is possible to reduce thenumber of updates of occurrence probabilities, and thus to reduce theprocessing amount.

For example, when an n-bit code is b0, b1, b2, . . . , bn−1, the codingtable for b0 is one table (CTb). Coding tables for b1 are two tables(CTb10 and CTb11). Coding tables to be used are switched according tothe value (0 or 1) of b0. Coding tables for b2 are four tables (CTb20,CTb21, CTb22, and CTb23). Coding tables to be used are switchedaccording to the values (in the range from 0 to 3) of b0 and b1. Codingtables for bn−1 are 2n−1 tables (CTbn0, CTbn1, . . . , CTbn (2n−1−1)).Coding tables to be used are switched according to the values (in arange from 0 to 2n−1−1) of b0, b1, . . . , bn−2.

It is to be noted that the three-dimensional data encoding device mayapply to an n-bit code, arithmetic encoding (m=2n) by m-ary that setsthe value in the range from 0 to 2n−1 without binarization. When thethree-dimensional data encoding device arithmetic encodes an n-bit codeby an m-ary, the three-dimensional data decoding device may reconstructthe n-bit code by arithmetic decoding the m-ary.

FIG. 56 is a diagram for illustrating processing in the case whereremaining codes are exponential-Golomb codes. As indicated in FIG. 56,each remaining code which is a part binarized using exponential-Golombcoding includes a prefix and a suffix. For example, thethree-dimensional data encoding device switches coding tables betweenthe prefix and the suffix. In other words, the three-dimensional dataencoding device arithmetic encodes each of bits included in the prefixusing coding tables for the prefix, and arithmetic encodes each of bitsincluded in the suffix using coding tables for the suffix.

It is to be noted that the three-dimensional data encoding device mayupdate the occurrence probabilities of 0 and 1 in each coding tableaccording to the values of binary data occurred actually. In addition,the three-dimensional data encoding device may fix the occurrenceprobabilities of 0 and 1 in one of coding tables. In this way, it ispossible to reduce the number of updates of occurrence probabilities,and thus to reduce the processing amount. For example, thethree-dimensional data encoding device may update the occurrenceprobabilities for the prefix, and may fix the occurrence probabilitiesfor the suffix.

In addition, the three-dimensional data encoding device decodes aquantized prediction residual by inverse quantization andreconstruction, and uses a decoded value which is the decoded predictionresidual for prediction of a current three-dimensional point to beencoded and the following three-dimensional point(s). More specifically,the three-dimensional data encoding device calculates an inversequantized value by multiplying the quantized prediction residual(quantized value) with a quantization scale, and adds the inversequantized value and a prediction value to obtain the decoded value(reconstructed value).

For example, quantized value a2iq of point a2 is calculated usingquantized value a2q of point a2 according to (Equation A11). Inversequantized value b2iq of point b2q is calculated using quantized valueb2q of point b2 according to (Equation A12). Here, QS_LoD0 is a QS forLoD0, and QS_LoD1 is a QS for LoD1. In other words, a QS may be changedaccording to an LoD.

a2iq=a2q×QS_LoD0  (Equation A11)

b2iq=b2q×QS_LoD1  (Equation A12)

For example, as represented by (Equation A13), decoded value a2rec ofpoint a2 is calculated by adding inverse quantization value a2iq ofpoint a2 to predicted value a2p of point a2. As represented by (EquationA14), decoded value b2rec of point b2 is calculated by adding inversequantized value b2iq of point b2 to predicted value b2p of point b2.

a2rec=a2iq+a2p  (Equation A13)

b2rec=b2iq+b2p  (Equation A14)

Hereinafter, a syntax example of a bitstream according to the presentembodiment is described. FIG. 57 is a diagram indicating the syntaxexample of an attribute header (attribute_header) according to thepresent embodiment. The attribute header is header information ofattribute information. As indicated in FIG. 57, the attribute headerincludes the number of layers information (NumLoD), the number ofthree-dimensional points information (NumOfPoint[i]), a layer thresholdvalue (Thres_LoD[i]), the number of neighbor points information(NumNeighborPoint[i]), a prediction threshold value (THd[i]), aquantization scale (QS[i]), and a binarization threshold value(R_TH[i]).

The number of layers information (NumLoD) indicates the number of LoDsto be used.

The number of three-dimensional points information (NumOfPoint[i])indicates the number of three-dimensional points belonging to layer i.It is to be noted that the three-dimensional data encoding device mayadd, to another header, the number of three-dimensional pointsinformation indicating the total number of three-dimensional points. Inthis case, the three-dimensional data encoding device does not need toadd, to a header, NumOfPoint [NumLoD−1] indicating the number ofthree-dimensional points belonging to the lowermost layer. In this case,the three-dimensional data decoding device is capable of calculatingNumOfPoint [NumLoD−1] according to (Equation A15). In this case, it ispossible to reduce the code amount of the header.

$\begin{matrix}{\mspace{79mu} \left\lbrack {{Math}.\mspace{11mu} 4} \right\rbrack} & \; \\{{{NumOfPoint}\left\lbrack {{NumLoD} - 1} \right\rbrack} = {{AllNumOfPoint} - {\sum\limits_{j = 0}^{{NumLoD} - 2}\; {{NumOfPoint}\lbrack j\rbrack}}}} & \left( {{Equation}\mspace{14mu} {A15}} \right)\end{matrix}$

The layer threshold value (Thres_LoD[i]) is a threshold value to be usedto set layer i. The three-dimensional data encoding device and thethree-dimensional data decoding device configure LoDi in such a mannerthat the distance between points in LoDi becomes larger than thresholdvalue Thres_LoD[i]. The three-dimensional data encoding device does notneed to add the value of Thres_LoD [NumLoD−1] (lowermost layer) to aheader. In this case, the three-dimensional data decoding device mayestimate 0 as the value of Thres_LoD [NumLoD−1]. In this case, it ispossible to reduce the code amount of the header.

The number of neighbor points information (NumNeighborPoint[i])indicates the upper limit value of the number of neighbor points to beused to generate a predicted value of a three-dimensional pointbelonging to layer i. The three-dimensional data encoding device maycalculate a predicted value using the number of neighbor points M whenthe number of neighbor points M is smaller than NumNeighborPoint[i](M<NumNeighborPoint[i]). Furthermore, when there is no need todifferentiate the values of NumNeighborPoint[i] for respective LoDs, thethree-dimensional data encoding device may add a piece of the number ofneighbor points information (NumNeighborPoint) to be used in all LoDs toa header.

The prediction threshold value (THd[i]) indicates the upper limit valueof the distance between a current three-dimensional point to be encodedor decoded in layer i and each of neighbor three-dimensional points tobe used to predict the current three-dimensional point. Thethree-dimensional data encoding device and the three-dimensional datadecoding device do not use, for prediction, any three-dimensional pointdistant from the current three-dimensional point over THd[i]. It is tobe noted that, when there is no need to differentiate the values ofTHd[i] for respective LoDs, the three-dimensional data encoding devicemay add a single prediction threshold value (THd) to be used in all LoDsto a header.

The quantization scale (QS[i]) indicates a quantization scale to be usedfor quantization and inverse quantization in layer i.

The binarization threshold value (R_TH[i]) is a threshold value forswitching binarization methods of prediction residuals ofthree-dimensional points belonging to layer i. For example, thethree-dimensional data encoding device binarizes prediction residual puusing a fixed bit count when a prediction residual is smaller thanthreshold value R_TH, and binarizes the binary data of threshold valueR_TH and the value of (pu−R_TH) using exponential-Golomb coding when aprediction residual is larger than or equal to threshold value R_TH. Itis to be noted that, when there is no need to switch the values ofR_TH[i] between LoDs, the three-dimensional data encoding device may adda single binarization threshold value (R_TH) to be used in all LoDs to aheader.

It is to be noted that R_TH[i] may be the maximum value which can berepresented by n bits. For example, R_TH is 63 in the case of 6 bits,and R_TH is 255 in the case of 8 bits. Alternatively, thethree-dimensional data encoding device may encode a bit count instead ofencoding the maximum value which can be represented by n bits as abinarization threshold value. For example, the three-dimensional dataencoding device may add value 6 in the case of R_TH[i]=63 to a header,and may add value 8 in the case of R_TH[i]=255 to a header.Alternatively, the three-dimensional data encoding device may define theminimum value (minimum bit count) representing R_TH[i], and add arelative bit count from the minimum value to a header. For example, thethree-dimensional data encoding device may add value 0 to a header whenR_TH[i]=63 is satisfied and the minimum bit count is 6, and may addvalue 2 to a header when R_TH[i]=255 is satisfied and the minimum bitcount is 6.

Alternatively, the three-dimensional data encoding device may entropyencode at least one of NumLoD, Thres_LoD[i], NumNeighborPoint[i],THd[i], QS[i], and R_TH[i], and add the entropy encoded one to a header.For example, the three-dimensional data encoding device may binarizeeach value and perform arithmetic encoding on the binary value. Inaddition, the three-dimensional data encoding device may encode eachvalue using a fixed length in order to reduce the processing amount.

Alternatively, the three-dimensional data encoding device does notalways need to add at least one of NumLoD, Thres_LoD[i],NumNeighborPoint[i], THd[i], QS[i], and R_TH[i] to a header. Forexample, at least one of these values may be defined by a profile or alevel in a standard, or the like. In this way, it is possible to reducethe bit amount of the header.

FIG. 58 is a diagram indicating the syntax example of attribute data(attribute_data) according to the present embodiment. The attribute dataincludes encoded data of the attribute information of a plurality ofthree-dimensional points. As indicated in FIG. 58, the attribute dataincludes an n-bit code and a remaining code.

The n-bit code is encoded data of a prediction residual of a value ofattribute information or a part of the encoded data. The bit length ofthe n-bit code depends on value R_TH[i]. For example, the bit length ofthe n-bit code is 6 bits when the value indicated by R_TH[i] is 63, thebit length of the n-bit code is 8 bits when the value indicated byR_TH[i] is 255.

The remaining code is encoded data encoded using exponential-Golombcoding among encoded data of the prediction residual of the value of theattribute information. The remaining code is encoded or decoded when thevalue of the n-bit code is equal to R_TH[i]. The three-dimensional datadecoding device decodes the prediction residual by adding the value ofthe n-bit code and the value of the remaining code. It is to be notedthat the remaining code does not always need to be encoded or decodedwhen the value of the n-bit code is not equal to R_TH[i].

Hereinafter, a description is given of a flow of processing in thethree-dimensional data encoding device. FIG. 59 is a flowchart of athree-dimensional data encoding process performed by thethree-dimensional data encoding device.

First, the three-dimensional data encoding device encodes geometryinformation (geometry) (S3001). For example, the three-dimensional dataencoding is performed using octree representation.

When the positions of three-dimensional points changed by quantization,etc, after the encoding of the geometry information, thethree-dimensional data encoding device re-assigns attribute informationof the original three-dimensional points to the post-changethree-dimensional points (S3002). For example, the three-dimensionaldata encoding device interpolates values of attribute informationaccording to the amounts of change in position to re-assign theattribute information. For example, the three-dimensional data encodingdevice detects pre-change N three-dimensional points closer to thepost-change three-dimensional positions, and performs weighted averagingof the values of attribute information of the N three-dimensionalpoints. For example, the three-dimensional data encoding devicedetermines weights based on distances from the post-changethree-dimensional positions to the respective N three-dimensionalpositions in weighted averaging. The three-dimensional data encodingdevice then determines the values obtained through the weightedaveraging to be the values of the attribute information of thepost-change three-dimensional points. When two or more of thethree-dimensional points are changed to the same three-dimensionalposition through quantization, etc., the three-dimensional data encodingdevice may assign the average value of the attribute information of thepre-change two or more three-dimensional points as the values of theattribute information of the post-change three-dimensional points.

Next, the three-dimensional data encoding device encodes the attributeinformation (attribute) re-assigned (S3003). For example, when encodinga plurality of kinds of attribute information, the three-dimensionaldata encoding device may encode the plurality of kinds of attributeinformation in order. For example, when encoding colors and reflectancesas attribute information, the three-dimensional data encoding device maygenerate a bitstream added with the color encoding results and thereflectance encoding results after the color encoding results. It is tobe noted that the order of the plurality of encoding results ofattribute information to be added to a bitstream is not limited to theorder, and may be any order.

Alternatively, the three-dimensional data encoding device may add, to aheader for example, information indicating the start location of encodeddata of each attribute information in a bitstream. In this way, thethree-dimensional data decoding device is capable of selectivelydecoding attribute information required to be decoded, and thus iscapable of skipping the decoding process of the attribute informationnot required to be decoded. Accordingly, it is possible to reduce theamount of processing by the three-dimensional data decoding device.Alternatively, the three-dimensional data encoding device may encode aplurality of kinds of attribute information in parallel, and mayintegrate the encoding results into a single bitstream. In this way, thethree-dimensional data encoding device is capable of encoding theplurality of kinds of attribute information at high speed.

FIG. 60 is a flowchart of an attribute information encoding process(S3003). First, the three-dimensional data encoding device sets LoDs(S3011). In other words, the three-dimensional data encoding deviceassigns each of three-dimensional points to any one of the plurality ofLoDs.

Next, the three-dimensional data encoding device starts a loop for eachLoD (S3012). In other words, the three-dimensional data encoding deviceiteratively performs the processes of Steps from S3013 to S3021 for eachLoD.

Next, the three-dimensional data encoding device starts a loop for eachthree-dimensional point (S3013). In other words, the three-dimensionaldata encoding device iteratively performs the processes of Steps fromS3014 to S3020 for each three-dimensional point.

First, the three-dimensional data encoding device searches a pluralityof neighbor points which are three-dimensional points present in theneighborhood of a current three-dimensional point to be processed andare to be used to calculate a predicted value of the currentthree-dimensional point (S3014). Next, the three-dimensional dataencoding device calculates the weighted average of the values ofattribute information of the plurality of neighbor points, and sets theresulting value to predicted value P (S3015). Next, thethree-dimensional data encoding device calculates a prediction residualwhich is the difference between the attribute information of the currentthree-dimensional point and the predicted value (S3016). Next, thethree-dimensional data encoding device quantizes the prediction residualto calculate a quantized value (S3017). Next, the three-dimensional dataencoding device arithmetic encodes the quantized value (S3018).

Next, the three-dimensional data encoding device inverse quantizes thequantized value to calculate an inverse quantized value (S3019). Next,the three-dimensional data encoding device adds a prediction value tothe inverse quantized value to generate a decoded value (S3020). Next,the three-dimensional data encoding device ends the loop for eachthree-dimensional point (S3021). Next, the three-dimensional dataencoding device ends the loop for each LoD (S3022).

Hereinafter, a description is given of a three-dimensional data decodingprocess in the three-dimensional data decoding device which decodes abitstream generated by the three-dimensional data encoding device.

The three-dimensional data decoding device generates decoded binary databy arithmetic decoding the binary data of the attribute information inthe bitstream generated by the three-dimensional data encoding device,according to the method similar to the one performed by thethree-dimensional data encoding device. It is to be noted that whenmethods of applying arithmetic encoding are switched between the part(n-bit code) binarized using n bits and the part (remaining code)binarized using exponential-Golomb coding in the three-dimensional dataencoding device, the three-dimensional data decoding device performsdecoding in conformity with the arithmetic encoding, when applyingarithmetic decoding.

For example, the three-dimensional data decoding device performsarithmetic decoding using coding tables (decoding tables) different foreach bit in the arithmetic decoding of the n-bit code. At this time, thethree-dimensional data decoding device may change the number of codingtables to be used for each bit. For example, the three-dimensional datadecoding device performs arithmetic decoding using one coding table forfirst bit b0 in the n-bit code. The three-dimensional data decodingdevice uses two coding tables for next bit b1. The three-dimensionaldata decoding device switches coding tables to be used for arithmeticdecoding of bit b1 according to the value (0 or 1) of b0. Likewise, thethree-dimensional data decoding device uses four coding tables for nextbit b2. The three-dimensional data decoding device switches codingtables to be used for arithmetic decoding of bit b2 according to thevalues (in the range from 0 to 3) of b0 and b1.

In this way the three-dimensional data decoding device uses 2n−1 codingtables when arithmetic decoding each bit bn−1 in the n-bit code. Thethree-dimensional data decoding device switches coding tables to be usedaccording to the values (occurrence patterns) of bits before bn−1. Inthis way, the three-dimensional data decoding device is capable ofappropriately decoding a bitstream encoded at an increased codingefficiency using the coding tables appropriate for each bit.

It is to be noted that the three-dimensional data decoding device mayreduce the number of coding tables to be used for each bit. For example,the three-dimensional data decoding device may switch 2m coding tablesaccording to the values (occurrence patterns) of m bits (m<n−1) beforebn−1 when arithmetic decoding each bit bn−1. In this way, thethree-dimensional data decoding device is capable of appropriatelydecoding the bitstream encoded at the increased coding efficiency whilereducing the number of coding tables to be used for each bit. It is tobe noted that the three-dimensional data decoding device may update theoccurrence probabilities of 0 and 1 in each coding table according tothe values of binary data occurred actually. In addition, thethree-dimensional data decoding device may fix the occurrenceprobabilities of 0 and 1 in coding tables for some bit(s). In this way,it is possible to reduce the number of updates of occurrenceprobabilities, and thus to reduce the processing amount.

For example, when an n-bit code is b0, b1, b2, . . . , bn−1, the codingtable for b0 is one (CTb0). Coding tables for b1 are two tables (CTb10and CTb11). Coding tables to be used are switched according to the value(0 or 1) of b0. Coding tables for b2 are four tables (CTb20, CTb21,CTb22, and CTb23). Coding tables to be used according to the values (inthe range from 0 to 3) of b0 and b1. Coding tables for bn−1 are 2n−1tables (CTbn0, CTbn1, . . . , CTbn (2n−1−1)). Coding tables to be usedare switched according to the values (in the range from 0 to 2n−1−1) ofb0, b1, . . . , bn−2.

FIG. 61 is a diagram for illustrating processing in the case whereremaining codes are exponential-Golomb codes. As indicated in FIG. 61,the part (remaining part) binarized and encoded by the three-dimensionaldata encoding device using exponential-Golomb coding includes a prefixand a suffix. For example, the three-dimensional data decoding deviceswitches coding tables between the prefix and the suffix. In otherwords, the three-dimensional data decoding device arithmetic decodeseach of bits included in the prefix using coding tables for the prefix,and arithmetic decodes each of bits included in the suffix using codingtables for the suffix.

It is to be noted that the three-dimensional data decoding device mayupdate the occurrence probabilities of 0 and 1 in each coding tableaccording to the values of binary data occurred at the time of decoding.In addition, the three-dimensional data decoding device may fix theoccurrence probabilities of 0 and 1 in one of coding tables. In thisway, it is possible to reduce the number of updates of occurrenceprobabilities, and thus to reduce the processing amount. For example,the three-dimensional data decoding device may update the occurrenceprobabilities for the prefix, and may fix the occurrence probabilitiesfor the suffix.

Furthermore, the three-dimensional data decoding device decodes thequantized prediction residual (unsigned integer value) by debinarizingthe binary data of the prediction residual arithmetic decoded accordingto a method in conformity with the encoding method used by thethree-dimensional data encoding device. The three-dimensional datadecoding device first arithmetic decodes the binary data of an n-bitcode to calculate a value of the n-bit code. Next, the three-dimensionaldata decoding device compares the value of the n-bit code with thresholdvalue R_TH.

In the case where the value of the n-bit code and threshold value R_THmatch, the three-dimensional data decoding device determines that a bitencoded using exponential-Golomb coding is present next, and arithmeticdecodes the remaining code which is the binary data encoded usingexponential-Golomb coding. The three-dimensional data decoding devicethen calculates, from the decoded remaining code, a value of theremaining code using a reverse lookup table indicating the relationshipbetween the remaining code and the value. FIG. 62 is a diagramindicating an example of a reverse lookup table indicating relationshipsbetween remaining codes and the values thereof. Next, thethree-dimensional data decoding device adds the obtained value of theremaining code to R_TH, thereby obtaining a debinarized quantizedprediction residual.

In the opposite case where the value of the n-bit code and thresholdvalue R_TH do not match (the value of the n-bit code is smaller thanvalue R_TH), the three-dimensional data decoding device determines thevalue of the n-bit code to be the debinarized quantized predictionresidual as it is. In this way the three-dimensional data decodingdevice is capable of appropriately decoding the bitstream generatedwhile switching the binarization methods according to the values of theprediction residuals by the three-dimensional data encoding device.

It is to be noted that, when threshold value R_TH is added to, forexample, a header of a bitstream, the three-dimensional data decodingdevice may decode threshold value R_TH from the header, and may switchdecoding methods using decoded threshold value R_TH. When thresholdvalue R_TH is added to, for example, a header for each LoD, thethree-dimensional data decoding device switch decoding methods usingthreshold value R_TH decoded for each LoD.

For example, when threshold value R_TH is 63 and the value of thedecoded n-bit code is 63, the three-dimensional data decoding devicedecodes the remaining code using exponential-Golomb coding, therebyobtaining the value of the remaining code. For example, in the exampleindicated in FIG. 62, the remaining code is 00100, and 3 is obtained asthe value of the remaining code. Next, the three-dimensional datadecoding device adds 63 that is threshold value R_TH and 3 that is thevalue of the remaining code, thereby obtaining 66 that is the value ofthe prediction residual.

In addition, when the value of the decoded n-bit code is 32, thethree-dimensional data decoding device sets 32 that is the value of then-bit code to the value of the prediction residual.

In addition, the three-dimensional data decoding device converts thedecoded quantized prediction residual, for example, from an unsignedinteger value to a signed integer value, through processing inverse tothe processing in the three-dimensional data encoding device. In thisway, when entropy decoding the prediction residual, thethree-dimensional data decoding device is capable of appropriatelydecoding the bitstream generated without considering occurrence of anegative integer. It is to be noted that the three-dimensional datadecoding device does not always need to convert an unsigned integervalue to a signed integer value, and that, for example, thethree-dimensional data decoding device may decode a sign bit whendecoding a bitstream generated by separately entropy encoding the signbit.

The three-dimensional data decoding device performs decoding by inversequantizing and reconstructing the quantized prediction residual afterbeing converted to the signed integer value, to obtain a decoded value.The three-dimensional data decoding device uses the generated decodedvalue for prediction of a current three-dimensional point to be decodedand the following three-dimensional point(s). More specifically, thethree-dimensional data decoding device multiplies the quantizedprediction residual by a decoded quantization scale to calculate aninverse quantized value and adds the inverse quantized value and thepredicted value to obtain the decoded value.

The decoded unsigned integer value (unsigned quantized value) isconverted into a signed integer value through the processing indicatedbelow. When the least significant bit (LSB) of decoded unsigned integervalue a2u is 1, the three-dimensional data decoding device sets signedinteger value a2q to −((a2u+1)>>1). When the LSB of unsigned integervalue a2u is not 1, the three-dimensional data decoding device setssigned integer value a2q to ((a2u>>1).

Likewise, when an LSB of decoded unsigned integer value b2u is 1, thethree-dimensional data decoding device sets signed integer value b2q to−((b2u+1)>>1). When the LSB of decoded unsigned integer value n2u is not1, the three-dimensional data decoding device sets signed integer valueb2q to ((b2u>>1).

Details of the inverse quantization and reconstruction processing by thethree-dimensional data decoding device are similar to the inversequantization and reconstruction processing in the three-dimensional dataencoding device.

Hereinafter, a description is given of a flow of processing in thethree-dimensional data decoding device. FIG. 63 is a flowchart of athree-dimensional data decoding process performed by thethree-dimensional data decoding device. First, the three-dimensionaldata decoding device decodes geometry information (geometry) from abitstream (S3031). For example, the three-dimensional data decodingdevice performs decoding using octree representation.

Next, the three-dimensional data decoding device decodes attributeinformation (attribute) from the bitstream (S3032). For example, whendecoding a plurality of kinds of attribute information, thethree-dimensional data decoding device may decode the plurality of kindsof attribute information in order. For example, when decoding colors andreflectances as attribute information, the three-dimensional datadecoding device decodes the color encoding results and the reflectanceencoding results in order of assignment in the bitstream. For example,when the reflectance encoding results are added after the color encodingresults in a bitstream, the three-dimensional data decoding devicedecodes the color encoding results, and then decodes the reflectanceencoding results. It is to be noted that the three-dimensional datadecoding device may decode, in any order, the encoding results of theattribute information added to the bitstream.

Alternatively, the three-dimensional data encoding device may add, to aheader for example, information indicating the start location of encodeddata of each attribute information in a bitstream. In this way, thethree-dimensional data decoding device is capable of selectivelydecoding attribute information required to be decoded, and thus iscapable of skipping the decoding process of the attribute informationnot required to be decoded. Accordingly, it is possible to reduce theamount of processing by the three-dimensional data decoding device. Inaddition, the three-dimensional data decoding device may decode aplurality of kinds of attribute information in parallel, and mayintegrate the decoding results into a single three-dimensional pointcloud. In this way, the three-dimensional data decoding device iscapable of decoding the plurality of kinds of attribute information athigh speed.

FIG. 64 is a flowchart of an attribute information decoding process(S3032). First, the three-dimensional data decoding device sets LoDs(S3041). In other words, the three-dimensional data decoding deviceassigns each of three-dimensional points having the decoded geometryinformation to any one of the plurality of LoDs. For example, thisassignment method is the same as the assignment method used in thethree-dimensional data encoding device.

Next, the three-dimensional data decoding device starts a loop for eachLoD (S3042). In other words, the three-dimensional data decoding deviceiteratively performs the processes of Steps from S3043 to S3049 for eachLoD.

Next, the three-dimensional data decoding device starts a loop for eachthree-dimensional point (S3043). In other words, the three-dimensionaldata decoding device iteratively performs the processes of Steps fromS3044 to S3048 for each three-dimensional point.

First, the three-dimensional data decoding device searches a pluralityof neighbor points which are three-dimensional points present in theneighborhood of a current three-dimensional point to be processed andare to be used to calculate a predicted value of the currentthree-dimensional point to be processed (S3044). Next, thethree-dimensional data decoding device calculates the weighted averageof the values of attribute information of the plurality of neighborpoints, and sets the resulting value to predicted value P (S3045). It isto be noted that these processes are similar to the processes in thethree-dimensional data encoding device.

Next, the three-dimensional data decoding device arithmetic decodes thequantized value from the bitstream (S3046). The three-dimensional datadecoding device inverse quantizes the decoded quantized value tocalculate an inverse quantized value (S3047). Next, thethree-dimensional data decoding device adds a predicted value to theinverse quantized value to generate a decoded value (S3048). Next, thethree-dimensional data decoding device ends the loop for eachthree-dimensional point (S3049). Next, the three-dimensional dataencoding device ends the loop for each LoD (S3050).

The following describes configurations of the three-dimensional dataencoding device and three-dimensional data decoding device according tothe present embodiment. FIG. 65 is a block diagram illustrating aconfiguration of three-dimensional data encoding device 3000 accordingto the present embodiment. Three-dimensional data encoding device 3000includes geometry information encoder 3001, attribute informationre-assigner 3002, and attribute information encoder 3003.

Attribute information encoder 3003 encodes geometry information(geometry) of a plurality of three-dimensional points included in aninput point cloud. Attribute information re-assigner 3002 re-assigns thevalues of attribute information of the plurality of three-dimensionalpoints included in the input point cloud, using the encoding anddecoding results of the geometry information. Attribute informationencoder 3003 encodes the re-assigned attribute information (attribute).Furthermore, three-dimensional data encoding device 3000 generates abitstream including the encoded geometry information and the encodedattribute information.

FIG. 66 is a block diagram illustrating a configuration ofthree-dimensional data decoding device 3010 according to the presentembodiment. Three-dimensional data decoding device 3010 includesgeometry information decoder 3011 and attribute information decoder3012.

Geometry information decoder 3011 decodes the geometry information(geometry) of a plurality of three-dimensional points from a bitstream.Attribute information decoder 3012 decodes the attribute information(attribute) of the plurality of three-dimensional points from thebitstream. Furthermore, three-dimensional data decoding device 3010integrates the decoded geometry information and the decoded attributeinformation to generate an output point cloud.

As described above, the three-dimensional data encoding device accordingto the present embodiment performs the process illustrated in FIG. 67.The three-dimensional data encoding device encodes a three-dimensionalpoint having attribute information. First, the three-dimensional dataencoding device calculates a predicted value of the attributeinformation of the three-dimensional point (S3061). Next, thethree-dimensional data encoding device calculates a prediction residualwhich is the difference between the attribute information of thethree-dimensional point and the predicted value (S3062). Next, thethree-dimensional data encoding device binarizes the prediction residualto generate binary data (S3063). Next, the three-dimensional dataencoding device arithmetic encodes the binary data (S3064).

In this way, the three-dimensional data encoding device is capable ofreducing the code amount of the to-be-coded data of the attributeinformation by calculating the prediction residual of the attributeinformation, and binarizing and arithmetic encoding the predictionresidual.

For example, in arithmetic encoding (S3064), the three-dimensional dataencoding device uses coding tables different for each of bits of binarydata. By doing so, the three-dimensional data encoding device canincrease the coding efficiency.

For example, in arithmetic encoding (S3064), the number of coding tablesto be used is larger for a lower-order bit of the binary data.

For example, in arithmetic encoding (S3064), the three-dimensional dataencoding device selects coding tables to be used to arithmetic encode acurrent bit included in binary data, according to the value of ahigher-order bit with respect to the current bit. By doing so, since thethree-dimensional data encoding device can select coding tables to beused according to the value of the higher-order bit, thethree-dimensional data encoding device can increase the codingefficiency.

For example, in binarization (S3063), the three-dimensional dataencoding device: binarizes a prediction residual using a fixed bit countto generate binary data when the prediction residual is smaller than athreshold value (R_TH); and generates binary data including a first code(n-bit code) and a second code (remaining code) when the predictionresidual is larger than or equal to the threshold value (R_TH). Thefirst code is of a fixed bit count indicating the threshold value(R_TH), and the second code (remaining code) is obtained by binarizing,using exponential-Golomb coding, the value obtained by subtracting thethreshold value (R_TH) from the prediction residual. In arithmeticencoding (S3064), the three-dimensional data encoding device usesarithmetic encoding methods different between the first code and thesecond code.

With this, for example, since it is possible to arithmetic encode thefirst code and the second code using arithmetic encoding methodsrespectively suitable for the first code and the second code, it ispossible to increase coding efficiency.

For example, the three-dimensional data encoding device quantizes theprediction residual, and, in binarization (S3063), binarizes thequantized prediction residual. The threshold value (R_TH) is changedaccording to a quantization scale in quantization. With this, since thethree-dimensional data encoding device can use the threshold valuesuitably according to the quantization scale, it is possible to increasethe coding efficiency.

For example, the second code includes a prefix and a suffix. Inarithmetic encoding (S3064), the three-dimensional data encoding deviceuses different coding tables between the prefix and the suffix. In thisway, the three-dimensional data encoding device can increase the codingefficiency.

For example, the three-dimensional data encoding device includes aprocessor and memory, and the processor performs the above process usingthe memory.

The three-dimensional data decoding device according to the presentembodiment performs the process illustrated in FIG. 68. Thethree-dimensional data decoding device decodes a three-dimensional pointhaving attribute information. First, the three-dimensional data decodingdevice calculates a predicted value of the attribute information of athree-dimensional point (S3071). Next, the three-dimensional datadecoding device arithmetic decodes encoded data included in a bitstreamto generate binary data (S3072). Next, the three-dimensional datadecoding device debinarizes the binary data to generate a predictionresidual (S3073). Next, the three-dimensional data decoding devicecalculates a decoded value of the attribute information of thethree-dimensional point by adding the predicted value and the predictionresidual (S3074).

In this way the three-dimensional data decoding device is capable ofappropriately decoding the bitstream of the attribute informationgenerated by calculating the prediction residual of the attributeinformation and binarizing and arithmetic decoding the predictionresidual.

For example, in arithmetic decoding (S3072), the three-dimensional datadecoding device uses coding tables different for each of bits of binarydata. With this, the three-dimensional data decoding device is capableof appropriately decoding the bitstream encoded at an increased codingefficiency.

For example, in arithmetic decoding (S3072), the number of coding tablesto be used is larger for a lower bit of the binary data.

For example, in arithmetic decoding (S3072), the three-dimensional datadecoding device selects coding tables to be used to arithmetic decode acurrent bit included in binary data, according to the value of ahigher-order bit with respect to the current bit. With this, thethree-dimensional data decoding device is capable of appropriatelydecoding the bitstream encoded at an increased coding efficiency.

For example, in debinarizaion (S3073), the three-dimensional datadecoding device debinarizes the first code (n-bit code) of a fixed bitcount included in the binary data to generate a first value. Thethree-dimensional data decoding device: determines the first value to bethe prediction residual when the first value is smaller than thethreshold value (R_TH); and, when the first value is larger than orequal to the threshold value (R_YH), generates a second value bydebinarizing the second code (remaining code) which is anexponential-Golomb code included in the binary data and adds the firstvalue and the second value, thereby generating a prediction residual. Inthe arithmetic decoding (S3072), the three-dimensional data decodingdevice uses arithmetic decoding methods different between the first codeand the second code.

With this, the three-dimensional data decoding device is capable ofappropriately decoding the bitstream encoded at an increased codingefficiency.

For example, the three dimensional data decoding device inversequantizes the prediction residual, and, in addition (S3074), adds thepredicted value and the inverse quantized prediction residual. Thethreshold value (R_TH) is changed according to a quantization scale ininverse quantization. With this, the three-dimensional data decodingdevice is capable of appropriately decoding the bitstream encoded at anincreased coding efficiency.

For example, the second code includes a prefix and a suffix. Inarithmetic decoding (S3072), the three-dimensional data decoding deviceuses different coding tables between the prefix and the suffix. Withthis, the three-dimensional data decoding device is capable ofappropriately decoding the bitstream encoded at an increased codingefficiency.

For example, the three-dimensional data decoding device includes aprocessor and memory, and the processor performs the above-describedprocess using the memory.

Embodiment 9

Predicted values may be generated by a method different from that inEmbodiment 8. Hereinafter, a three-dimensional point to be encoded isreferred to as a first three-dimensional point, and one or morethree-dimensional points in the vicinity of the first three-dimensionalpoint is referred to as one or more second three-dimensional points insome cases.

For example, in generating of a predicted value of an attributeinformation item (attribute information) of a three-dimensional point,an attribute value as it is of a closest three-dimensional point amongencoded and decoded three-dimensional points in the vicinity of athree-dimensional point to be encoded may be generated as a predictedvalue. In the generating of the predicted value, prediction modeinformation (PredMode) may be appended for each three-dimensional point,and one predicted value may be selected from a plurality of predictedvalues to allow generation of a predicted value. Specifically, forexample, it is conceivable that, for total number M of prediction modes,an average value is assigned to prediction mode 0, an attribute value ofthree-dimensional point A is assigned to prediction mode 1, . . . , andan attribute value of three-dimensional point Z is assigned toprediction mode M−1, and the prediction mode used for prediction isappended to a bitstream for each three-dimensional point. As such, afirst prediction mode value indicating a first prediction mode forcalculating, as a predicted value, an average of attribute informationitems of the surrounding three-dimensional points may be smaller than asecond prediction mode value indicating a second prediction mode forcalculating, as a predicted value, an attribute information item as itis of a surrounding three-dimensional point. Here, the “average value”as the predicted value calculated in prediction mode 0 is an averagevalue of the attribute values of the three-dimensional points in thevicinity of the three-dimensional point to be encoded.

FIG. 69 is a diagram showing a first example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9. FIG. 70 is a diagram showing examples of attributeinformation items used as the predicted values according to Embodiment9. FIG. 71 is a diagram showing a second example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9.

Number M of prediction modes may be appended to a bitstream. Number M ofprediction modes may be defined by a profile or a level of standardsrather than appended to the bitstream. Number M of prediction modes maybe also calculated from number N of three-dimensional points used forprediction. For example, number M of prediction modes may be calculatedby M=N+1.

The table in FIG. 69 is an example of a case with number N ofthree-dimensional points used for prediction being 4 and number M ofprediction modes being 5. A predicted value of an attribute informationitem of point b2 can be generated by using attribute information itemsof points a0, a1, a2, b1. In selecting one prediction mode from aplurality of prediction modes, a prediction mode for generating, as apredicted value, an attribute value of each of points a0, a1, a2, b1 maybe selected in accordance with distance information from point b2 toeach of points a0, a1, a2, b1. The prediction mode is appended for eachthree-dimensional point to be encoded. The predicted value is calculatedin accordance with a value corresponding to the appended predictionmode.

The table in FIG. 71 is, as in FIG. 69, an example of a case with numberN of three-dimensional points used for prediction being 4 and number Mof prediction modes being 5. A predicted value of an attributeinformation item of point a2 can be generated by using attributeinformation items of points a0, a1. In selecting one prediction modefrom a plurality of prediction modes, a prediction mode for generating,as a predicted value, an attribute value of each of points a0 and a1 maybe selected in accordance with distance information from point a2 toeach of points a0, a1. The prediction mode is appended for eachthree-dimensional point to be encoded. The predicted value is calculatedin accordance with a value corresponding to the appended predictionmode.

When the number of neighboring points, that is, number N of surroundingthree-dimensional points is smaller than four such as at point a2 above,a prediction mode to which a predicted value is not assigned may bewritten as “not available” in the table.

Assignment of values of the prediction modes may be determined inaccordance with the distance from the three-dimensional point to beencoded. For example, prediction mode values indicating a plurality ofprediction modes decrease with decreasing distance from thethree-dimensional point to be encoded to the surroundingthree-dimensional points having the attribute information items used asthe predicted values. The example in FIG. 69 shows that points b1, a2,a1, a0 are sequentially located closer to point b2 as thethree-dimensional point to be encoded. For example, in the calculatingof the predicted value, the attribute information item of point b1 iscalculated as the predicted value in a prediction mode indicated by aprediction mode value of “1” among two or more prediction modes, and theattribute information item of point a2 is calculated as the predictedvalue in a prediction mode indicated by a prediction mode value of “2”.As such, the prediction mode value indicating the prediction mode forcalculating, as the predicted value, the attribute information item ofpoint b1 is smaller than the prediction mode value indicating theprediction mode for calculating, as the predicted value, the attributeinformation item of point a2 farther from point b2 than point b1.

Thus, a small prediction mode value can be assigned to a point that ismore likely to be predicted and selected due to a short distance,thereby reducing a bit number for encoding the prediction mode value.Also, a small prediction mode value may be preferentially assigned to athree-dimensional point belonging to the same LoD as thethree-dimensional point to be encoded.

FIG. 72 is a diagram showing a third example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9. Specifically, the third example is an example of a casewhere an attribute information item used as a predicted value is a valueof color information (YUV) of a surrounding three-dimensional point. Assuch, the attribute information item used as the predicted value may becolor information indicating a color of the three-dimensional point.

As shown in FIG. 72, a predicted value calculated in a prediction modeindicated by a prediction mode value of “0” is an average of Y, U, and Vcomponents defining a YUV color space. Specifically, the predicted valueincludes a weighted average Yave of Y component values Yb1, Ya2, Ya1,Ya0 corresponding to points b1, a2, a1, a0, respectively, a weightedaverage Uave of U component values Ub1, Ua2, Ua1, Ua0 corresponding topoints b1, a2, a1, a0, respectively, and a weighted average Vave of Vcomponent values Vb1, Va2, Va1, Va0 corresponding to points b1, a2, a1,a0, respectively. Predicted values calculated in prediction modesindicated by prediction mode values of “1” to “4” include colorinformation of the surrounding three-dimensional points b1, a2, a1, a0.The color information is indicated by combinations of the Y, U, and Vcomponent values.

In FIG. 72, the color information is indicated by a value defined by theYUV color space, but not limited to the YUV color space. The colorinformation may be indicated by a value defined by an RGB color space ora value defined by any other color space.

As such, in the calculating of the predicted value, two or more averagesor two or more attribute information items may be calculated as thepredicted values of the prediction modes. The two or more averages orthe two or more attribute information items may indicate two or morecomponent values each defining a color space.

For example, when a prediction mode indicated by a prediction mode valueof “2” in the table in FIG. 72 is selected, a Y component, a Ucomponent, and a V component as attribute values of thethree-dimensional point to be encoded may be encoded as predicted valuesYa2, Ua2, Va2. In this case, the prediction mode value of “2” isappended to the bitstream.

FIG. 73 is a diagram showing a fourth example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9. Specifically, the fourth example is an example of a casewhere an attribute information item used as a predicted value is a valueof reflectance information of a surrounding three-dimensional point. Thereflectance information is, for example, information indicatingreflectance R.

As shown in FIG. 73, a predicted value calculated in a prediction modeindicated by a prediction mode value of “0” is weighted average Rave ofreflectances Rb1, Ra2, Ra1, Ra0 corresponding to points b1, a2, a1, a0,respectively. Predicted values calculated in prediction modes indicatedby prediction mode values of “1” to “4” are reflectances Rb1, Ra2, Ra1,Ra0 of surrounding three-dimensional points b1, a2, a1, a0,respectively.

For example, when a prediction mode indicated by a prediction mode valueof “3” in the table in FIG. 73 is selected, a reflectance as anattribute value of a three-dimensional point to be encoded may beencoded as predicted value Ra1. In this case, the prediction mode valueof “3” is appended to the bitstream.

As shown in FIGS. 89 and 90, the attribute information item may includea first attribute information item and a second attribute informationitem different from the first attribute information item. The firstattribute information item is, for example, color information. Thesecond attribute information item is, for example, reflectanceinformation. In the calculating of the predicted value, a firstpredicted value may be calculated by using the first attributeinformation item, and a second predicted value may be calculated byusing the second attribute information item.

When the attribute information item includes a plurality of componentslike color information such as a YUV color space or an RGB color space,predicted values may be calculated in different prediction modes for therespective components. For example, for the YUV space, predicted valuesusing a Y component, a U component, and a V component may be calculatedin prediction modes selected for the respective components. For example,prediction mode values may be selected in prediction mode Y forcalculating the predicted value using the Y component, prediction mode Ufor calculating the predicted value using the U component, andprediction mode V for calculating the predicted value using the Vcomponent. In this case, values in tables in FIGS. 91 to 93 describedlater may be used as the prediction mode values indicating theprediction modes of the components, and the prediction mode values maybe appended to the bitstream. The YUV color space has been describedabove, but the same applies to the RGB color space.

Predicted values including two or more components among a plurality ofcomponents of an attribute information item may be calculated in acommon prediction mode. For example, for the YUV color space, predictionmode values may be selected in prediction mode Y for calculating thepredicted value using the Y component and prediction mode UV forcalculating the predicted value using the UV components. In this case,values in tables in FIGS. 91 and 94 described later may be used as theprediction mode values indicating the prediction modes of thecomponents, and the prediction mode values may be appended to thebitstream.

FIG. 74 is a diagram showing a fifth example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9. Specifically, the fifth example is an example of a casewhere an attribute information item used as a predicted value is a Ycomponent value of color information of a surrounding three-dimensionalpoint.

As shown in FIG. 74, a predicted value calculated in prediction mode Yindicated by a prediction mode value of “0” is weighted average Yave ofY component values Yb1, Ya2, Ya1, Ya0 corresponding to points b1, a2,a1, a0, respectively. Predicted values calculated in prediction modesindicated by prediction mode values of “1” to “4” are Y component valuesYb1, Ya2, Ya1, Ya0 of surrounding three-dimensional points b1, a2, a1,a0, respectively.

For example, when prediction mode Y indicated by a prediction mode valueof “2” in the table in FIG. 74 is selected, a Y component as anattribute value of a three-dimensional point to be encoded may be usedas predicted value Ya2 and encoded. In this case, the prediction modevalue of “2” is appended to the bitstream.

FIG. 75 is a diagram showing a sixth example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9. Specifically the sixth example is an example of a casewhere an attribute information item used as a predicted value is a Ucomponent value of color information of a surrounding three-dimensionalpoint.

As shown in FIG. 75, a predicted value calculated in prediction mode Uindicated by a prediction mode value of “0” is weighted average Uave ofU component values Ub1, Ua2, Ua1, Ua0 corresponding to points b1, a2,a1, a0, respectively. Predicted values calculated in prediction modesindicated by prediction mode values of “1” to “4” are U component valuesUb1, Ua2, Ua1, Ua0 of surrounding three-dimensional points b1, a2, a1,a0, respectively.

For example, when prediction mode U indicated by a prediction mode valueof “1” in the table in FIG. 75 is selected, a U component as anattribute value of a three-dimensional point to be encoded may beencoded as predicted value Ub1. In this case, the prediction mode valueof “1” is appended to the bitstream.

FIG. 76 is a diagram showing a seventh example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9. Specifically, the seventh example is an example of a casewhere an attribute information item used as a predicted value is a Vcomponent value of color information of a surrounding three-dimensionalpoint.

As shown in FIG. 76, a predicted value calculated in prediction mode Vindicated by a prediction mode value of “0” is weighted average Vave ofV component values Vb1, Va2, Va1, Va0 corresponding to points b1, a2,a1, a0, respectively. Predicted values calculated in prediction modesindicated by prediction mode values of “1” to “4” are V component valuesVb1, Va2, Va1, Va0 of surrounding three-dimensional points b1, a2, a1,a0, respectively.

For example, when prediction mode V indicated by a prediction mode valueof “4” in the table in FIG. 76 is selected, a V component as anattribute value of a three-dimensional point to be encoded may be usedas predicted value Va0 and encoded. In this case, the prediction modevalue of “4” is appended to the bitstream.

FIG. 77 is a diagram showing an eighth example of a table representingpredicted values calculated in the prediction modes according toEmbodiment 9. Specifically, the eighth example is an example of a casewhere attribute information items used as predicted values are a Ucomponent value and a V component value of color information of asurrounding three-dimensional point.

As shown in FIG. 77, a predicted value calculated in prediction mode Uindicated by a prediction mode value of “0” includes weighted averageUave of U component values Ub1, Ub2, Ua1, Ua0 corresponding to pointsb1, a2, a1, a0, respectively and weighted average Vave of V componentvalues Vb1, Va2, Va1, Va0 corresponding to points b1, a2, a1, a0,respectively. Predicted values calculated in prediction modes indicatedby prediction mode values of “1” to “4” include U component values and Vcomponent values of surrounding three-dimensional points b1, a2, a1, a0,respectively.

For example, when prediction mode UV indicated by a prediction modevalue of “1” in the table in FIG. 77 is selected, a U component and a Vcomponent as attribute values of a three-dimensional point to be encodedmay be used as predicted values Ub1, Vb1 and encoded. In this case, theprediction mode value of “1” is appended to the bitstream.

A prediction mode in encoding may be selected by RD optimization. Forexample, it is conceivable that cost cost(P) when certain predictionmode P is selected is calculated, and prediction mode P with minimumcost(P) is selected. Cost cost(P) may be calculated by Equation D1using, for example, prediction residual residual(P) when a predictedvalue of prediction mode P is used, bit number bit(P) required forencoding prediction mode P, and adjustment parameter value □.

cost(P)=abs(residual(P))+□×bit(P)  (Equation D1)

where abs(x) denotes an absolute value of x.

A square value of x may be used instead of abs(x).

Using Equation D1 above allows selection of a prediction modeconsidering balance between a size of a prediction residual and a bitnumber required for encoding the prediction mode. Different adjustmentparameter values □ may be set in accordance with values of aquantization scale. For example, at a small quantization scale (at ahigh bit rate), value □ may be set smaller to select a prediction modewith smaller prediction residual residual(P) to increase predictionaccuracy as much as possible. At a large quantization scale (at a lowbit rate), value □ may be set larger to select an appropriate predictionmode while considering bit number bit(P) required for encodingprediction mode P.

“At a small quantization scale” is, for example, when the quantizationscale is smaller than a first quantization scale. “At a largequantization scale” is, for example, when the quantization scale islarger than a second quantization scale equal to or greater than thefirst quantization scale. Values □ may be set smaller at smallerquantization scales.

Prediction residual residual(P) is calculated by subtracting a predictedvalue of prediction mode P from an attribute value of athree-dimensional point to be encoded. Instead of prediction residualresidual(P) in calculating of cost, prediction residual residual(P) maybe quantized or inverse quantized and added to the predicted value toobtain a decoded value, and a difference (encoding error) from a decodedvalue when an attribute value of an original three-dimensional point andprediction mode P are used may be reflected in the cost value. Thisallows selection of a prediction mode with a small encoding error.

In binarizing and encoding a prediction mode, for example, a binarizedbit number may be used as bit number bit(P) required for encodingprediction mode P. For example, with number M of prediction modes being5, as in FIG. 78, a prediction mode value indicating the prediction modemay be binarized by a truncated unary code in accordance with number Mof prediction modes with a maximum value of 5. In this case, 1 bit for aprediction mode value of “0”, 2 bits for a prediction mode value of “1”,3 bits for a prediction mode value of “2”, and 4 bits for predictionmode values of “4” and “5” are used as bit numbers bit(P) required forencoding the prediction mode values. By using the truncated unary code,the bit number is set smaller for smaller prediction mode values. Thiscan reduce the code amount of a prediction mode value indicating aprediction mode for calculating a predicted value that is more likely tobe selected, for example, that is more likely to minimize cost(P), suchas an average value calculated as a predicted value when the predictionmode value is “0”, or an attribute information item of athree-dimensional point calculated as a predicted value when theprediction mode value is “1”, that is, an attribute information item ofa three-dimensional point close to the three-dimensional point to beencoded.

When a maximum value of the number of prediction modes is notdetermined, as in FIG. 79, a prediction mode value indicating aprediction mode may be binarized by a unary code. When a probability ofappearance of each prediction mode is close, as shown in FIG. 80, theprediction mode value indicating the prediction mode may be binarized bya fixed code to reduce the code amount.

As bit number bit(P) required for encoding the prediction mode valueindicating prediction mode P, binarized data of the prediction modevalue indicating prediction mode P may be arithmetic-encoded, and thecode amount after the arithmetic-encoding may be used as a value ofbit(P). This allows calculation of cost using more accurate required bitnumber bit(P), thereby allowing selection of a more appropriateprediction mode.

FIG. 78 is a diagram showing a first example of a binarization table inbinarizing and encoding the prediction mode values according toEmbodiment 9. Specifically, the first example is an example ofbinarizing the prediction mode values with a truncated unary code withnumber M of prediction modes being 5.

FIG. 79 is a diagram showing a second example of a binarization table inbinarizing and encoding the prediction mode values according toEmbodiment 9. Specifically, the second example is an example ofbinarizing the prediction mode values with a unary code with number M ofprediction modes being 5.

FIG. 80 is a diagram showing a third example of a binarization table inbinarizing and encoding the prediction mode values according toEmbodiment 9. Specifically the third example is an example of binarizingthe prediction mode values with a fixed code with number M of predictionmodes being 5.

A prediction mode value indicating a prediction mode (PredMode) may bearithmetic-encoded after binarized, and appended to the bitstream. Asdescribed above, the prediction mode value may be binarized, forexample, by the truncated unary code in accordance with number M ofprediction modes. In this case, a maximum bit number after binarizationof the prediction mode value is M−1.

The binary data after binarization may be arithmetic-encoded withreference to an encoding table. In this case, for example, encodingtables may be switched for encoding for each bit of the binary data,thereby improving an encoding efficiency. Also, to reduce the number ofencoding tables, among the binary data, the beginning bit one bit may beencoded with reference to encoding table A for one bit, and each ofremaining bits may be encoded with reference to encoding table B forremaining bits. For example, in encoding binarized data “1110” with aprediction mode value of “3” in FIG. 81, the beginning bit one bit “1”may be encoded with reference to encoding table A, and each of remainingbits “110” may be encoded with reference to encoding table B.

FIG. 81 is a diagram for describing an example of encoding binary datain the binarization table in binarizing and encoding the predictionmodes according to Embodiment 9. The binarization table in FIG. 81 is anexample of binarizing the prediction mode values with a truncated unarycode with number M of prediction modes being 5.

Thus, an encoding efficiency can be improved by switching the encodingtables in accordance with a bit position of the binary data whilereducing the number of encoding tables. Further, in encoding theremaining bits, arithmetic-encoding may be performed by switching theencoding tables for each bit, or decoding may be performed by switchingthe encoding tables in accordance with a result of thearithmetic-encoding.

In binarizing and encoding the prediction mode value with the truncatedunary code using number M of prediction modes, number M of predictionmodes used in the truncated unary code may be appended to a header andthe like of the bitstream so that the prediction mode can be specifiedfrom binary data decoded on a decoding side. Also, value MaxM that maybe a value of the number of prediction modes may be defined by standardsor the like, and value MaxM−M (M□MaxM) may be appended to the header.Number M of prediction modes may be defined by a profile or a level ofstandards rather than appended to the stream.

It is considered that the prediction mode value binarized by thetruncated unary code is arithmetic-encoded by switching the encodingtables between one bit part and a remaining part as described above. Theprobability of appearance of 0 and 1 in each encoding table may beupdated in accordance with actually generated binary data. Also, theprobability of appearance of 0 and 1 in either of the encoding tablesmay be fixed. Thus, an update frequency of the probability of appearancemay be reduced to reduce a processing amount. For example, theprobability of appearance of the one bit part may be updated, and theprobability of appearance of the remaining bit part may be fixed.

FIG. 82 is a flowchart of an example of encoding a prediction mode valueaccording to Embodiment 9. FIG. 83 is a flowchart of an example ofdecoding a prediction mode value according to Embodiment 9.

As shown in FIG. 82, in encoding the prediction mode value, first, theprediction mode value is binarized by a truncated unary code inaccordance with number M of prediction modes (S3401).

Then, binary data of the truncated unary code is arithmetic-encoded(S3402). Thus, the binary data is included as a prediction mode in thebitstream.

Also, as shown in FIG. 83, in decoding the prediction mode value, first,the bitstream is arithmetic-decoded by using number M of predictionmodes to generate binary data of the truncated unary code (S3403).

Then, the prediction mode value is calculated from the binary data ofthe truncated unary code (S3404).

Embodiment 10

When the three-dimensional data encoding device binarizes a value of aprediction mode (PredMode) with a truncated unary code using a value ofa number of prediction modes (a total number M of prediction modes) andarithmetically encodes the binarized value, there may be a predictionmode to which no predicted value is assigned, depending on the number ofthe peripheral three-dimensional points, which are three-dimensionalpoints that can be used for prediction of an attribute information item(attribute information) on a current three-dimensional point to beencoded and are located in the periphery of the currentthree-dimensional point encoded and then decoded.

For example, if the total number M of prediction modes is five, and thenumber N of peripheral three-dimensional points is two, thethree-dimensional data encoding device assigns an average value ofattribute information on the peripheral three-dimensional points toprediction mode 0 and assigns attribute values of two peripheralthree-dimensional points to prediction modes 1 and 2, respectively, aspredicted values of prediction modes. In this case, thethree-dimensional data encoding device assigns no predicted value toprediction modes 3 and 4.

Thus, the three-dimensional data encoding device may detect a predictionmode to which no predicted value is assigned and, if there is aprediction mode to which no predicted value is assigned, assign a newpredicted value to the prediction mode to which no predicted value isassigned.

In this way, the three-dimensional data encoding device can improve theencoding efficiency.

For example, the three-dimensional data encoding device may assign apossible median (referred to as a median or a median value hereinafter)of the attribute values as a new predicted value. Alternatively forexample, if the attribute information is a degree of reflection, and thebit precision is 8-bit precision, that is, if the degree of reflectioncan assume a value from 0 to 255 as attribute information, thethree-dimensional data encoding device may assign a value of 127 to aprediction mode as a predicted value. Alternatively, for example, if thebit precision of the degree of reflection is 10-bit precision, that is,if the degree of reflection can assume a value from 0 to 1023 asattribute information, the three-dimensional data encoding device mayassign a value of 511 to a prediction mode as a predicted value.Alternatively, for example, if the attribute information is colorinformation (for example, YUV or RGB), and Y:U:V (or R:G:B) is 8-bit4:4:4, the three-dimensional data encoding device may assign (127, 127,127) to (Y, U, V) (or (R, G, B)) as predicted values. Alternatively, forexample, the three-dimensional data encoding device may assign acombination of a value of a component of the color information, a medianand 0, such as (127, 0, 0) or (0, 127, 0), to (Y, U, V) (or (R, G, B))as predicted values.

Alternatively, for example, as described above, when a prediction modeis added for each component of color information, the three-dimensionaldata encoding device may detect whether there is a prediction mode towhich no predicted value is assigned for each component and, if there isa prediction mode to which no predicted value is assigned, assign a newpredicted value to the prediction mode.

For example, if the bit precision of each component of color informationis 8-bit precision, the three-dimensional data encoding device mayassign a value of 127 as a median as a predicted value of attributeinformation for each component of color information.

Note that an example has been described in which the three-dimensionaldata encoding device assigns a median to a prediction mode as a newpredicted value, but the present disclosure is not necessarily limitedthereto. The three-dimensional data encoding device can assign anyvalue, such as the maximum value or minimum value of possible predictedvalues, to a prediction mode.

When the three-dimensional data encoding device assigns a value α (αdenotes an arbitrary constant) to a prediction mode as a new predictedvalue, the three-dimensional data encoding device can add the newlyassigned predicted value α to a header or the like of a bitstream. Forexample, a three-dimensional data decoding device may decode the value αadded to the header of the bitstream and assign the value α to aprediction mode as a new predicted value in the same manner as in thethree-dimensional data encoding device.

FIG. 84 is a diagram showing a first example of a table containingpredicted values for prediction modes according to the presentembodiment. (a) and (b) of FIG. 84 are tables showing an example ofencoding of a prediction mode (PredMode), and (c) of FIG. 84 is a tableshowing an example of decoding of the prediction mode.

As shown in (a) of FIG. 84, for example, when the total number M ofprediction modes is five, and the number of three-dimensional pointsthat can be used for prediction of a periphery of a currentthree-dimensional point to be encoded is two, the three-dimensional dataencoding device detects that no predicted value is assigned toprediction modes 3 and 4, and assigns a new predicted value toprediction modes 3 and 4. In the example shown in (a) of FIG. 84, thethree-dimensional data encoding device assigns a new predicted value(New predictor), which is an arbitrary value, to prediction mode 3 andassigns an initial value (a value of 0) to prediction mode 4.

The three-dimensional data encoding device generates the table shown in(b) of FIG. 84, which is a result of encoding with a truncated unarycode in the case where the total number M of prediction modes is fiveand is the table shown in (a) of FIG. 84 encoded with a truncated unarycode.

For example, if the three-dimensional data encoding device selectsprediction mode 3, the three-dimensional data encoding device generatesbinarized data “1110” by binarizing selected prediction mode 3 forarithmetic encoding.

If the three-dimensional data decoding device is to assign a predictedvalue to a prediction mode in the same manner as in thethree-dimensional data encoding device, for example, thethree-dimensional data decoding device detects a prediction mode towhich no predicted value is assigned and assigns a new predicted valueto the prediction mode.

In this way, as shown in (c) of FIG. 84, for example, thethree-dimensional data decoding device can correctly decode predictionmode 3 and decode the bitstream containing the new predicted value shownin (a) of FIG. 84 as a predicted value.

FIG. 85 is a diagram showing a second example of the table containingpredicted values for prediction modes according to the presentembodiment. Specifically, FIG. 85 is a diagram showing an example inwhich the three-dimensional data encoding device assigns a median as anew predicted value in the case where the total number M of predictionmodes is five, and the number of three-dimensional points that can beused for prediction of a periphery of a current three-dimensional pointto be encoded is two.

As shown in (a) of FIG. 85, for example, the three-dimensional dataencoding device detects that no predicted value is assigned toprediction mode 3, and assigns a median as a new predicted value.

The three-dimensional data encoding device generates the table shown in(b) of FIG. 85, which is the table shown in (a) of FIG. 85 encoded witha truncated unary code. For example, if the three-dimensional dataencoding device selects prediction mode 3, the three-dimensional dataencoding device generates binarized data “1110” by binarizing and thenarithmetically encoding selected prediction mode 3.

If the three-dimensional data decoding device is to assign a predictedvalue to a prediction mode in the same manner as in thethree-dimensional data encoding device, for example, thethree-dimensional data decoding device detects a prediction mode towhich no predicted value is assigned and assigns a median as a newpredicted value to the prediction mode.

In this way, as shown in (c) of FIG. 85, for example, thethree-dimensional data decoding device can correctly decode predictionmode 3 and decode the bitstream containing the median shown in (a) ofFIG. 85 as a predicted value.

FIG. 86 is a diagram showing a third example of the table containingpredicted values for prediction modes according to the presentembodiment. Specifically, FIG. 86 is a diagram showing an example inwhich the three-dimensional data encoding device assigns a value α (αdenotes an arbitrary constant) as a new predicted value in the casewhere the total number M of prediction modes is five, and the number ofthree-dimensional points that can be used for prediction of a peripheryof a current three-dimensional point to be encoded is two.

As shown in (a) of FIG. 86, for example, the three-dimensional dataencoding device detects that no predicted value is assigned toprediction mode 3, and assigns a value α as a new predicted value.

The three-dimensional data encoding device generates the table shown in(b) of FIG. 86, which is the table shown in (a) of FIG. 86 encoded witha truncated unary code. For example, if the three-dimensional dataencoding device selects prediction mode 3, the three-dimensional dataencoding device generates binarized data “1110” by binarizing and thenarithmetically encoding selected prediction mode 3.

If the three-dimensional data decoding device is to assign a predictedvalue to a prediction mode in the same manner as in thethree-dimensional data encoding device, for example, thethree-dimensional data decoding device detects a prediction mode towhich no predicted value is assigned and assigns a value α as a newpredicted value to the prediction mode.

In this way, as shown in (c) of FIG. 86, for example, thethree-dimensional data decoding device can correctly decode predictionmode 3 and decode the bitstream containing the value α shown in (a) ofFIG. 86 as a predicted value.

If the three-dimensional data encoding device detects a plurality ofprediction modes to which no predicted value is assigned, thethree-dimensional data encoding device may assign a plurality of newpredicted values to the prediction modes.

For example, if the three-dimensional data encoding device detects Pprediction modes to which no predicted value is assigned, thethree-dimensional data encoding device may assign a new predicted valueto Q prediction modes of the P prediction modes (Q≤P). Morespecifically, if the three-dimensional data encoding device detects twoprediction modes to which no predicted value is assigned, for example,the three-dimensional data encoding device may assign a median to oneprediction mode and assign a maximum value (or minimum value or thelike) to the other prediction mode.

In this way, the three-dimensional data encoding device can assign asmany predicted values as possible to prediction modes to which nopredicted value is assigned, thereby improving the encoding efficiency.

The three-dimensional data encoding device may limit the number ofpredicted values to be newly assigned.

For example, the three-dimensional data encoding device may determinethe upper limit of the number of predicted values to be newly assignedto be R, and assign up to R new predicted values.

The three-dimensional data encoding device may add the value of R to theheader or the like of the bitstream. Alternatively, the value of R maybe defined by profile or level of a standard or the like. For example,in the case of R=1, when the three-dimensional data encoding devicedetects two prediction modes to which no predicted value is assigned,the three-dimensional data encoding device may assign one median.

In this way, the three-dimensional data encoding device can reduce theprocessing amount and improve the encoding efficiency.

FIG. 87 is a diagram showing a fourth example of the table containingpredicted values for prediction modes according to the presentembodiment. Specifically, FIG. 87 is a diagram showing an example inwhich the three-dimensional data encoding device assigns a new predictedvalue 1 (New predictor 1) and a new predicted value 2 (New predictor 2)as new predicted values in the case where the total number M ofprediction modes is five, and the number of three-dimensional pointsthat can be used for prediction of a periphery of a currentthree-dimensional point to be encoded is two.

As shown in (a) of FIG. 87, for example, when the three-dimensional dataencoding device detects that no predicted value is assigned toprediction modes 3 and 4, the three-dimensional data encoding deviceassigns the new predicted value 1 to prediction mode 3 and the newpredicted value 2 to prediction mode 4 as new predicted values.

The three-dimensional data encoding device generates the table shown in(b) of FIG. 87, which is the table shown in (a) of FIG. 87 encoded witha truncated unary code. For example, if the three-dimensional dataencoding device selects prediction mode 3, the three-dimensional dataencoding device generates binarized data “1110” by binarizing and thenarithmetically encoding selected prediction mode 3.

If the three-dimensional data decoding device is to assign a predictedvalue to a prediction mode in the same manner as in thethree-dimensional data encoding device, for example, thethree-dimensional data decoding device detects a prediction mode towhich no predicted value is assigned and assigns a new predicted valueto the prediction mode.

In this way, as shown in (c) of FIG. 87, for example, thethree-dimensional data decoding device can correctly decode predictionmode 3 and decode the bitstream containing the new predicted value 1shown in (a) of FIG. 87 as a predicted value.

FIG. 88 is a diagram showing a fifth example of the table containingpredicted values for prediction modes according to the presentembodiment. Specifically, FIG. 88 is a diagram showing an example inwhich the three-dimensional data encoding device assigns a median and amaximum value as new predicted values in the case where the total numberM of prediction modes is five, and the number of three-dimensionalpoints that can be used for prediction of a periphery of a currentthree-dimensional point to be encoded is two.

As shown in (a) of FIG. 88, for example, when the three-dimensional dataencoding device detects that no predicted value is assigned toprediction modes 3 and 4, the three-dimensional data encoding deviceassigns the median to prediction mode 3 and the maximum value toprediction mode 4 as new predicted values.

The three-dimensional data encoding device generates the table shown in(b) of FIG. 88, which is the table shown in (a) of FIG. 88 encoded witha truncated unary code. For example, if the three-dimensional dataencoding device selects prediction mode 3, the three-dimensional dataencoding device generates binarized data “1110” by binarizing and thenarithmetically encoding selected prediction mode 3.

If the three-dimensional data decoding device is to assign a predictedvalue to a prediction mode in the same manner as in thethree-dimensional data encoding device, for example, thethree-dimensional data decoding device detects a prediction mode towhich no predicted value is assigned and assigns a new predicted valueto the prediction mode.

In this way, as shown in (c) of FIG. 88, for example, thethree-dimensional data decoding device can correctly decode predictionmode 3 and decode the bitstream containing the median shown in (a) ofFIG. 88 as a predicted value.

FIG. 89 is a diagram showing a sixth example of the table containingpredicted values for prediction modes according to the presentembodiment. Specifically, FIG. 89 is a diagram showing an example inwhich the three-dimensional data encoding device assigns R new predictedvalues as new predicted values in the case where the total number M ofprediction modes is five, and the number of three-dimensional pointsthat can be used for prediction of a periphery of a currentthree-dimensional point to be encoded is two. Note that FIG. 89 is adiagram illustrating a case where R=1.

As shown in (a) of FIG. 89, for example, when the three-dimensional dataencoding device detects that no predicted value is assigned toprediction modes 3 and 4, the three-dimensional data encoding devicegenerates a new predicted value 1 (an arbitrary constant) and assignsthe new predicted value 1 to prediction mode 3 as a new predicted value.In this case, a value of 0, which is an initial value, is assigned toprediction mode 4, for example.

The three-dimensional data encoding device generates the table shown in(b) of FIG. 89, which is the table shown in (a) of FIG. 89 encoded witha truncated unary code. For example, if the three-dimensional dataencoding device selects prediction mode 3, the three-dimensional dataencoding device generates binarized data “1110” by binarizing selectedprediction mode 3 for arithmetic encoding.

If the three-dimensional data decoding device is to assign a predictedvalue to a prediction mode in the same manner as in thethree-dimensional data encoding device, for example, thethree-dimensional data decoding device detects prediction modes to whichno predicted value is assigned and assigns R new predicted values to theprediction modes.

In this way, as shown in (c) of FIG. 89, for example, thethree-dimensional data decoding device can correctly decode predictionmode 3 and decode the bitstream containing the new predicted value 1shown in (a) of FIG. 89 as a predicted value.

The three-dimensional data encoding device may add the value of R, whichis the upper limit value of the number of predicted values to be newlyassigned, to the header or the like of the bitstream. Alternatively, thevalue of R may be defined by profile or level of a standard or the like.

FIG. 90 is a flowchart of a first example of a calculation process for apredicted value by the three-dimensional data encoding device accordingto the present embodiment.

First, the three-dimensional data encoding device calculates a weightedaverage value of attribute values of N peripheral three-dimensionalpoints that are three-dimensional points (peripheral three-dimensionalpoints) in a periphery of a current three-dimensional point to beencoded and can be used for prediction, and assigns the calculatedweighted average value to prediction mode 0 (S4001).

The three-dimensional data encoding device then calculates a maximumabsolute differential value maxdiff of the attribute values of the Nthree-dimensional points in the periphery of the currentthree-dimensional point to be encoded (S4002).

The three-dimensional data encoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4003). Thfix can bean arbitrary constant, and the value of Thfix is not particularlylimited.

If the three-dimensional data encoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4003), thethree-dimensional data encoding device sets a prediction mode fixationflag at 1 and performs arithmetic encoding (S4004).

The three-dimensional data encoding device then determines the value ofthe prediction mode to be 0 (weighted average value) (S4005).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4006).

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4003), the three-dimensional data encoding device sets the predictionmode fixation flag at 0 and performs arithmetic encoding (S4007).

The three-dimensional data encoding device then selects a predictionmode (S4008).

The three-dimensional data encoding device then arithmetically encodesthe selected prediction mode (S4009).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4006).

In step S4009, as described above, the three-dimensional data encodingdevice may arithmetically encode the value of the prediction mode bybinarizing the value with a truncated unary code using the total numberM of prediction modes.

The three-dimensional data encoding device may encode the total number Mof prediction modes as NumPredMode and add the encoded data to theheader of the bitstream.

This allows the three-dimensional data decoding device to correctlydecode the prediction mode by decoding NumPredMode in the header.

When NumPredMode=1, the three-dimensional data encoding device does nothave to encode the value of the prediction mode.

In this way, the code amount can be reduced when NumPredMode=1.

FIG. 91 is a flowchart of the selection process for a prediction mode(S4008) shown in FIG. 90.

First, the three-dimensional data encoding device assigns attributeinformation on N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be encoded to prediction modes 1to N in ascending order of distance (S40081). For example, thethree-dimensional data encoding device generates N+1 prediction modesand assigns attribute information on N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point to beencoded to prediction modes 1 to N in ascending order of distance.

Note that, if N+1 is greater than the total number M (NumPredMode) ofprediction modes to be added to the bitstream, the three-dimensionaldata encoding device may generate up to M prediction modes.

The three-dimensional data encoding device then checks the predictionmodes, and adds a new predicted value to any prediction mode to which nopredicted value is assigned (S40082).

The three-dimensional data encoding device then sets the predicted valueof any prediction mode to which no predicted value is assigned evenafter step S40082 is performed at an initial value (a value of 0)(S40083).

The three-dimensional data encoding device then calculates a cost foreach prediction mode, and selects a prediction mode for which the costis minimum (S40084).

FIG. 92 is a flowchart of details of the selection process for aprediction mode (S40084) shown in FIG. 91.

First, the three-dimensional data encoding device sets i at 0 andmincost at ∞ (S400841).

The three-dimensional data encoding device then calculates a cost(cost[i]) of i-th prediction mode PredMode[i] (S400842).

The three-dimensional data encoding device then determines whether acondition that cost[i]<mincost is satisfied or not (S400843).

If the three-dimensional data encoding device determines that thecondition that cost[i]<mincost is satisfied (Yes in S400843), thethree-dimensional data encoding device sets mincost at cost[i], and setsthe prediction mode to be PredMode[i] (S400844).

Following step S400844, or if the three-dimensional data encoding devicedetermines that the condition that cost[i]<mincost is not satisfied (Noin S400843), the three-dimensional data encoding device sets i at i+1(S400845).

The three-dimensional data encoding device then determines whether acondition that i<number of prediction modes (total number of predictionmodes) is satisfied or not (S400846).

If the three-dimensional data encoding device determines that thecondition that i<number of prediction modes is not satisfied (No inS400846), the three-dimensional data encoding device ends the selectionprocess. If the three-dimensional data encoding device determines thatthe condition that i<number of prediction modes is satisfied (Yes inS400846), the process returns to step S400842.

FIG. 93 is a flowchart of a first example of a process by thethree-dimensional data decoding device according to the presentembodiment.

The three-dimensional data decoding device decodes geometry information(geometry) on the encoded three-dimensional point (S4011). For example,the three-dimensional data decoding device may decode the geometryinformation using an octree representation.

The three-dimensional data decoding device decodes the attributeinformation on the encoded three-dimensional point (S4012).

Note that, when the three-dimensional data decoding device decodes aplurality of pieces of attribute information, the three-dimensional datadecoding device may sequentially decode the attribute information. Forexample, when the three-dimensional data decoding device decodes colorand degree of reflection as attribute information, the three-dimensionaldata decoding device may decode the bitstream including the result ofencoding of color followed by the result of encoding of degree ofreflectance in this order.

The three-dimensional data decoding device can decode the result ofencoding of the attribute information included in the bitstream in anyorder.

The three-dimensional data decoding device may obtain a starting pointof the encoded data of each piece of attribute information in thebitstream by decoding the header or the like.

In this way, the three-dimensional data decoding device can decodeattribute information that needs to be decoded. Therefore, thethree-dimensional data decoding device can omit the process of decodingattribute information that does not need to be decoded, thereby reducingthe processing amount.

The three-dimensional data decoding device may decode a plurality ofpieces of attribute information in parallel and integrate results of thedecoding into one three-dimensional point cloud.

In this way, the three-dimensional data decoding device can decode aplurality of pieces of attribute information at a high speed.

FIG. 94 is a flowchart of the decoding process for attribute information(S4012) shown in FIG. 93.

First, the three-dimensional data decoding device obtains decodedgeometry information on three-dimensional points included in thebitstream (S40121). More specifically the three-dimensional datadecoding device obtains decoded geometry information by decoding encodedgeometry information on three-dimensional points included in thebitstream transmitted from the three-dimensional data encoding device.

The three-dimensional data decoding device then sets (generates) an LoD(S40122). That is, the three-dimensional data decoding device assignseach three-dimensional point to any of a plurality of LoDs.

The three-dimensional data decoding device then starts a loop on an LoDbasis (S40123). That is, the three-dimensional data decoding devicerepeatedly performs the process from step S40124 to step S40129 for eachLoD.

The three-dimensional data decoding device obtains attribute informationincluded in the bitstream in parallel with the process from step S40121,for example (S40131).

The three-dimensional data decoding device decodes PredMode and aquantized value of P (S40132).

For example, as for the steps in the dashed line (more specifically,steps S40122 and step S40132) in FIG. 94, since the number NumOfPoint ofthree-dimensional points for each LoD is added to the header part or thelike, the three-dimensional data decoding device can make the process ofdecoding PredMode in the bitstream and the process of calculating thethree-dimensional points in the periphery of the currentthree-dimensional point to be decoded that can be used for predictionafter generation of LoDs independent from each other. As a result, thethree-dimensional data decoding device can independently perform the LoDgeneration and search for a neighboring point of P and the arithmeticdecoding process (to decode PredMode and quantized value of P) forPredMode, an n-bit code and a remainder code. Therefore, thethree-dimensional data decoding device can also perform the processes inparallel.

In this way, the three-dimensional data decoding device can reduce theoverall processing time.

The three-dimensional data decoding device then starts a loop for eachthree-dimensional point (S40124). That is, the three-dimensional datadecoding device repeatedly performs the process from step S40125 to stepS40128 for each three-dimensional point at a certain LoD. FIG. 94 showsdecoding of the current three-dimensional point P to be decoded.

The three-dimensional data decoding device then searches for a pluralityof peripheral points, which are three-dimensional points present in theperiphery of the current three-dimensional point P, that are used forcalculation of a predicted value of the current three-dimensional pointP to be processed (S40125).

The three-dimensional data decoding device then calculates a predictedvalue of the current three-dimensional point P based on PredMode (thatis, the value of the prediction mode) decoded in step S40132 (S40126).

Based on the quantized value of P decoded in step S40131, thethree-dimensional data decoding device then calculates an inversequantized value by inverse quantizing the quantized value (S40127).

The three-dimensional data decoding device then generates a decodedvalue by adding the predicted value to the inverse quantized value(S40128).

The three-dimensional data decoding device then ends the loop for eachthree-dimensional point (S40129).

The three-dimensional data decoding device also ends the loop for eachLoD (S40130).

FIG. 95 is a flowchart of details of the calculation process for apredicted value (S40126) shown in FIG. 94.

First, the three-dimensional data decoding device calculates a weightedaverage value of attribute values of N peripheral three-dimensionalpoints that are three-dimensional points in the periphery of the currentthree-dimensional point to be decoded and can be used for prediction,and assigns the calculated weighted average value to prediction mode 0(S401261).

The three-dimensional data decoding device then assigns attributeinformation on N peripheral three-dimensional points to prediction modes1 to N in ascending order of distance (S401262).

The three-dimensional data decoding device then checks the predictionmodes, and adds a new predicted value to any prediction mode to which nopredicted value is assigned (S401263).

After assigning a new predicted value to the prediction mode to which nopredicted value is assigned in step S401263, the three-dimensional datadecoding device then sets the predicted value of any prediction mode towhich no predicted value is assigned at an initial value (a value of 0,for example) (S401264).

The three-dimensional data decoding device then outputs the predictedvalue of the prediction mode decoded in step S40132 shown in FIG. 94(S401265).

FIG. 96 is a flowchart of a second example of the calculation processfor a predicted value by the three-dimensional data encoding deviceaccording to the present embodiment.

First, the three-dimensional data encoding device sets predicted valuesof all prediction modes at an initial value (a value of 0, for example)(or in other words, assigns an initial value as predicted values of allprediction modes) (S4021).

The three-dimensional data encoding device then calculates a weightedaverage value of attribute values of N peripheral three-dimensionalpoints that are three-dimensional points (peripheral three-dimensionalpoints) in a periphery of a current three-dimensional point to beencoded and can be used for prediction, and assigns the calculatedweighted average value to prediction mode 0 (S4022).

The three-dimensional data encoding device then calculates a maximumabsolute differential value maxdiff of the attribute values of the Nthree-dimensional points in the periphery of the currentthree-dimensional point to be encoded (S4023).

The three-dimensional data encoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4024).

If the three-dimensional data encoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4024), thethree-dimensional data encoding device sets a prediction mode fixationflag at 1 and performs arithmetic encoding (S4025).

The three-dimensional data encoding device then determines the value ofthe prediction mode to be 0 (weighted average value) (S4026).

The three-dimensional data encoding device then outputs the determinedpredicted value of the prediction mode (S4027).

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4024), the three-dimensional data encoding device sets the predictionmode fixation flag at 0 and performs arithmetic encoding (S4028).

The three-dimensional data encoding device then selects a predictionmode (S4029).

The three-dimensional data encoding device then arithmetically encodesthe selected prediction mode (S4030).

The three-dimensional data encoding device then outputs the determinedpredicted value of the prediction mode (S4027).

In step S4030, as described above, the three-dimensional data encodingdevice may arithmetically encode the value of the prediction mode bybinarizing the value with a truncated unary code using the total numberM of prediction modes.

The three-dimensional data encoding device may encode the total number Mof prediction modes as NumPredMode and add the encoded data to theheader of the bitstream.

This allows the three-dimensional data decoding device to correctlydecode the prediction mode by decoding NumPredMode in the header.

When NumPredMode=1, the three-dimensional data encoding device does nothave to encode the value of the prediction mode.

In this way the code amount can be reduced when NumPredMode=1.

FIG. 97 is a flowchart of the selection process for a prediction mode(S4029) shown in FIG. 96.

First, the three-dimensional data encoding device assigns attributeinformation on N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be encoded to prediction modes 1to N in ascending order of distance (S40291). For example, thethree-dimensional data encoding device generates N+1 prediction modesand assigns attribute information on N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point to beencoded to prediction modes 1 to N in ascending order of distance.

Note that, if N+1 is greater than the total number M (NumPredMode) ofprediction modes to be added to the bitstream, the three-dimensionaldata encoding device may generate up to M prediction modes.

The three-dimensional data encoding device then checks the predictionmodes, and adds a new predicted value to the prediction modes (S40292).That is, the three-dimensional data encoding device changes thepredicted value of any target prediction mode from the initial value tothe new predicted value.

The three-dimensional data encoding device then calculates a cost foreach prediction mode, and selects a prediction mode for which the costis minimum (S40293).

As described above, the second example differs from the first example inthat the three-dimensional data encoding device first assigns an initialvalue to all prediction modes and then changes the predicted value ofany target prediction mode from the initial value to a new predictedvalue, rather than checking the prediction modes and adding a newpredicted value to any prediction mode to which no predicted value isassigned.

FIG. 98 is a flowchart of details of the selection process for aprediction mode (S40293) shown in FIG. 97.

First, the three-dimensional data encoding device sets i at 0 andmincost at ∞ (S402931).

The three-dimensional data encoding device then calculates a cost(cost[i]) of i-th prediction mode PredMode[i] (S402932).

The three-dimensional data encoding device then determines whether acondition that cost[i]<mincost is satisfied or not (S402933).

If the three-dimensional data encoding device determines that thecondition that cost[i]<mincost is satisfied (Yes in S402933), thethree-dimensional data encoding device sets mincost at cost[i], and setsthe prediction mode to be PredMode[i] (S402934).

Following step S402934, or if the three-dimensional data encoding devicedetermines that the condition that cost[i]<mincost is not satisfied (Noin S402933), the three-dimensional data encoding device sets i at i+1(S402935).

The three-dimensional data encoding device then determines whether acondition that i<number of prediction modes (total number of predictionmodes) is satisfied or not (S402936).

If the three-dimensional data encoding device determines that thecondition that i<number of prediction modes is not satisfied (No inS402936), the three-dimensional data encoding device ends the selectionprocess. If the three-dimensional data encoding device determines thatthe condition that i<number of prediction modes is satisfied (Yes inS402936), the process returns to step S402932.

FIG. 99 is a flowchart of a second example of the process by thethree-dimensional data decoding device according to the presentembodiment.

The three-dimensional data decoding device decodes geometry information(geometry) on the encoded three-dimensional point (S4031). For example,the three-dimensional data decoding device may decode the geometryinformation using an octree representation.

The three-dimensional data decoding device decodes the attributeinformation on the encoded three-dimensional point (S4032).

Note that, when the three-dimensional data decoding device decodes aplurality of pieces of attribute information, the three-dimensional datadecoding device may sequentially decode the attribute information. Forexample, when the three-dimensional data decoding device decodes colorand degree of reflection as attribute information, the three-dimensionaldata decoding device may decode the bitstream including the result ofencoding of color followed by the result of encoding of degree ofreflectance in this order.

The three-dimensional data decoding device can decode the result ofencoding of the attribute information included in the bitstream in anyorder.

The three-dimensional data decoding device may obtain a starting pointof the encoded data of each piece of attribute information in thebitstream by decoding the header or the like.

In this way, the three-dimensional data decoding device can decodeattribute information that needs to be decoded. Therefore, thethree-dimensional data decoding device can omit the process of decodingattribute information that does not need to be decoded, thereby reducingthe processing amount.

The three-dimensional data decoding device may decode a plurality ofpieces of attribute information in parallel and integrate results of thedecoding into one three-dimensional point cloud.

In this way, the three-dimensional data decoding device can decode aplurality of pieces of attribute information at a high speed.

FIG. 100 is a flowchart of the decoding process for attributeinformation (S4032) shown in FIG. 99.

First, the three-dimensional data decoding device obtains decodedgeometry information on three-dimensional points included in thebitstream (S40321). More specifically, the three-dimensional datadecoding device obtains decoded geometry information by decoding encodedgeometry information on three-dimensional points included in thebitstream transmitted from the three-dimensional data encoding device.

The three-dimensional data decoding device then sets an LoD (S40322).That is, the three-dimensional data decoding device assigns eachthree-dimensional point to any of a plurality of LoDs.

The three-dimensional data decoding device then starts a loop on an LoDbasis (S40323). That is, the three-dimensional data decoding devicerepeatedly performs the process from step S40324 to step S40329 for eachLoD.

The three-dimensional data decoding device obtains attribute informationincluded in the bitstream in parallel with the process from step S40121,for example (S40331).

The three-dimensional data decoding device decodes PredMode and aquantized value of P (S40332).

For example, as for the steps in the dashed line (more specificallysteps S40322 and step S40332) in FIG. 100, since the number NumOfPointof three-dimensional points for each LoD is added to the header part orthe like, the three-dimensional data decoding device can make theprocess of decoding PredMode in the bitstream and the process ofcalculating the three-dimensional points in the periphery of the currentthree-dimensional point to be decoded that can be used for predictionafter generation of LoDs independent from each other. As a result, thethree-dimensional data decoding device can independently perform the LoDgeneration and search for a neighboring point of P and the arithmeticdecoding process (to decode PredMode and quantized value of P) forPredMode, an n-bit code and a remainder code. Therefore, thethree-dimensional data decoding device can also perform the processes inparallel.

In this way, the three-dimensional data decoding device can reduce theoverall processing time.

The three-dimensional data decoding device then starts a loop for eachthree-dimensional point (S40324). That is, the three-dimensional datadecoding device repeatedly performs the process from step S40325 to stepS40328 for each three-dimensional point at a certain LoD. FIG. 100 showsdecoding of the current three-dimensional point P to be decoded.

The three-dimensional data decoding device then searches for a pluralityof peripheral points, which are three-dimensional points present in theperiphery of the current three-dimensional point P, that are used forcalculation of a predicted value of the current three-dimensional pointP to be processed (S40325).

The three-dimensional data decoding device then calculates a predictedvalue of the current three-dimensional point P based on PredMode (thatis, the value of the prediction mode) decoded in step S40332 (S40326).

Based on the quantized value of P decoded in step S40332, thethree-dimensional data decoding device then calculates an inversequantized value by inverse quantizing the quantized value (S40327).

The three-dimensional data decoding device then generates a decodedvalue by adding the predicted value to the inverse quantized value(S40328).

The three-dimensional data decoding device then ends the loop for eachthree-dimensional point (S40329).

The three-dimensional data decoding device also ends the loop for eachLoD (S40330).

FIG. 101 is a flowchart of details of the calculation process for apredicted value (S40326) shown in FIG. 100.

First, the three-dimensional data decoding device assigns an initialvalue (a value of 0, for example) to predicted values of all predictionmodes (S403261).

The three-dimensional data decoding device then calculates a weightedaverage value of attribute values of N peripheral three-dimensionalpoints that are three-dimensional points in the periphery of the currentthree-dimensional point to be decoded and can be used for prediction,and assigns the calculated weighted average value to prediction mode 0(S403262). That is, the three-dimensional data decoding device onceassigns 0 as the predicted value of prediction mode 0 in step S403261,and then assigns the weighted average value as the predicted value ofprediction mode 0 in step S403262.

The three-dimensional data decoding device then assigns attributeinformation on the N peripheral three-dimensional points to predictionmodes 1 to N as predicted values in ascending order of distance(S403263).

The three-dimensional data decoding device then checks the predictionmodes, and adds a new predicted value to any prediction mode to which nopredicted value is assigned (S403264).

The three-dimensional data decoding device then outputs the predictedvalue of the prediction mode decoded in step S40332 shown in FIG. 100(S403265).

FIG. 102 is a flowchart of a first example of the assignment process fora new predicted value (step S40292 or step S403624) by thethree-dimensional data encoding device and the three-dimensional datadecoding device according to the present embodiment. The first to thirdexamples of the assignment process for a new predicted value describedbelow will be described as a process by the three-dimensional dataencoding device. Of course, the three-dimensional data decoding devicecan perform a similar process.

The first example is an example of the process in which thethree-dimensional data encoding device assigns one new predicted valueto one prediction mode.

First, the three-dimensional data encoding device detects the number (P,here) of prediction modes to which no predicted value is assigned(S4041).

The three-dimensional data encoding device then determines whether acondition that P>0 is satisfied or not (S4042).

If the three-dimensional data encoding device determines that thecondition that P>0 is satisfied (Yes in S4042), that is, if there is aprediction mode to which no predicted value is assigned, thethree-dimensional data encoding device additionally assigns one newpredicted value to the prediction mode to which no predicted value isassigned (S4043). Here, the three-dimensional data encoding device canassign any of the median, the maximum value, the minimum value or thevalue α to the prediction mode as a new predicted value.

The three-dimensional data encoding device may perform encoding byadding the value α to the header or the like of the bitstream. Thethree-dimensional data decoding device may obtain the value α bydecoding the header or the like of the bitstream. The value α may bedefined by level, profile or the like of a standard.

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that P>0 is not satisfied (No in S4042),that is, if there is no prediction mode to which no predicted value isassigned, the three-dimensional data encoding device ends the process.

FIG. 103 is a flowchart of a second example of the assignment processfor a new predicted value (step S40292 or step S403624) by thethree-dimensional data encoding device and the three-dimensional datadecoding device according to the present embodiment.

The second example is an example of the process in which thethree-dimensional data encoding device assigns a new predicted value toeach of a plurality of prediction modes.

First, the three-dimensional data encoding device detects the number ofprediction modes to which no predicted value is assigned (the number ofprediction modes is denoted as P, here) (S4051).

The three-dimensional data encoding device then determines whether acondition that P>0 is satisfied or not (S4052).

If the three-dimensional data encoding device determines that thecondition that P>0 is satisfied (Yes in S4052), that is, if there areprediction modes to which no predicted value is assigned, thethree-dimensional data encoding device additionally assigns one newpredicted value to one of the prediction modes to which no predictedvalue is assigned (S4053). Here, the three-dimensional data encodingdevice can assign any of the median, the maximum value, the minimumvalue or the value α to the prediction mode as a new predicted value.

The three-dimensional data encoding device then sets P at P−1 (S4054),and returns the process to step S4052. That is, since thethree-dimensional data encoding device has assigned a predicted value toone of the prediction modes to which no predicted value is assigned instep S4053, the three-dimensional data encoding device decrements thevalue of P by one, and returns the process to step S4052.

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that P>0 is not satisfied (No in S4052),that is, if there is no prediction mode to which no predicted value isassigned, the three-dimensional data encoding device ends the process.

FIG. 104 is a flowchart of a third example of the assignment process fora new predicted value (step S40292 or step S403624) by thethree-dimensional data encoding device and the three-dimensional datadecoding device according to the present embodiment.

The third example is an example of the process in which thethree-dimensional data encoding device assigns R new predicted values (Rdenotes an arbitrary positive integer). R (referred to also as an upperlimit value R) is an upper limit value of the number of the newpredicted values assigned to prediction modes by the three-dimensionaldata encoding device. R can be any number determined in advance and isnot particularly limited.

First, the three-dimensional data encoding device detects the number (P,here) of prediction modes to which no predicted value is assigned(S4061).

The three-dimensional data encoding device then sets r at 0 (S4062). rdenotes a value indicating the number of new predicted values assignedto the prediction modes by the three-dimensional data encoding device.

The three-dimensional data encoding device then determines whether acondition that P>0 and r<R is satisfied or not (S4063).

If the three-dimensional data encoding device determines that thecondition that P>0 and r<R is satisfied (Yes in S4063), that is, ifthere is a prediction mode to which no predicted value is assigned, thethree-dimensional data encoding device additionally assign one newpredicted value to the prediction mode to which no predicted value isassigned (S4064). Here, the three-dimensional data encoding device canassign any of the median, the maximum value, the minimum value or thevalue α to the prediction mode as a new predicted value.

The three-dimensional data encoding device then sets P at P−1 (S4065).

The three-dimensional data encoding device then sets r at r+1 (S4066),and returns the process to step S4063. That is, since thethree-dimensional data encoding device has assigned a predicted value toone of the prediction modes to which no predicted value is assigned instep S4064, the three-dimensional data encoding device increments thevalue of r by one, and returns the process to step S4063.

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that P>0 and r<R is not satisfied (No inS4063), that is, if there is no prediction mode to which no predictedvalue is assigned, and the number of the new predicted values assignedis greater than R, which is the upper limit value, the three-dimensionaldata encoding device ends the process.

Note that the three-dimensional data encoding device may performencoding by adding the upper limit value R to the header or the like ofthe bitstream. The three-dimensional data encoding device may obtain theupper limit value R by decoding the header or the like of the bitstream.The upper limit value R may be defined by level, profile or the like ofa standard.

[Variations]

Hereinafter, three-dimensional data encoding devices andthree-dimensional data decoding devices according to variations of thepresent embodiment will be described. In the variations hereinafter,specific examples of a predicted value assigned to a prediction modewill be described.

<Variation 1>

The three-dimensional data encoding device may calculate a predictedvalue of attribute information of a three-dimensional point from aweighted average value for N three-dimensional points (peripheralthree-dimensional points) in a periphery of a current three-dimensionalpoint to be encoded that is encoded and then decoded.

For example, the three-dimensional data encoding device performsweighted averaging using a distance (distance information) between acurrent three-dimensional point to be encoded and each of Nthree-dimensional points in a periphery of the current three-dimensionalpoint. In performing the weighted averaging, the three-dimensional dataencoding device takes an average by adding a higher weight to aperipheral three-dimensional point closer to the currentthree-dimensional point to be encoded, for example.

In this way, the three-dimensional data encoding device can generate apredicted value by giving higher precedence to the values of theattribute information on peripheral three-dimensional points closer tothe current three-dimensional point to be encoded. Therefore, thethree-dimensional data encoding device can improve the encodingefficiency.

FIG. 105 is a diagram showing an example of attribute information usedin calculating a predicted value.

As described above, a predicted value of point P included in LoDN isgenerated using encoded peripheral point P′ included in LoDN′ (N′≤N).Here, peripheral point P′ is selected based on the distance to point P.For example, a predicted value of attribute information on point a2shown in FIG. 105 is generated using attribute information on points a0and a1. Furthermore, for example, a predicted value of attributeinformation on point a5 shown in FIG. 105 is generated using attributeinformation on points a0, a1, a2, a3, and a4.

Note that the peripheral points selected varies with the value of Ndescribed above. For example, in the case of N=5, points a0, a1, a2, a3,and a4 are selected as peripheral points of point a5. In the case ofN=4, points a0, a1, a2, and a4 are selected based on distanceinformation.

The three-dimensional data encoding device may generate LoDs indescending order of level (beginning with LoD0, for example).Alternatively, the three-dimensional data encoding device may generateLoDs in ascending order of level (beginning with LoD2, for example).

The predicted value is calculated by distance-dependent weightedaveraging.

For example, in the example shown in FIG. 105, predicted value a2p ofpoint a2 is calculated by distance-dependent weighted averaging ofpoints a0 and a1, as shown in the following equations (Equation E1) and(Equation E2).

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 5} \right\rbrack & \; \\{{a\; 2\; p} = {\sum\limits_{i = 0}^{1}\; {w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu} {E1}} \right) \\{w_{i} = \frac{\frac{1}{d\left( {{a\; 2},{ai}} \right)}}{\sum_{j = 0}^{1}\frac{1}{d\left( {{a\; 2},{aj}} \right)}}} & \left( {{Equation}\mspace{14mu} {E2}} \right)\end{matrix}$

Note that A_(i) is a value of attribute information on point ai. d(p, q)is an Euclidean distance between three-dimensional point p and point q.

For example, predicted value a5p of point a5 is calculated bydistance-dependent weighted averaging of points a0, a1, a2, a3, and a4,as shown in the following equations (Equation E3) and (Equation E4).

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 6} \right\rbrack & \; \\{{a\; 5\; p} = {\sum\limits_{i = 0}^{4}\; {w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu} {E3}} \right) \\{w_{i} = \frac{\frac{1}{d\left( {{a\; 5},{ai}} \right)}}{\sum_{j = 0}^{4}\frac{1}{d\left( {{a\; 5},{aj}} \right)}}} & \left( {{Equation}\mspace{14mu} {E4}} \right)\end{matrix}$

For example predicted value aNp of point aN is calculated bydistance-dependent weighted averaging of points N−4, N−3, N−2, and N−1,as shown in the following equations (Equation E5) and (Equation E6).Note that N denotes a positive integer equal to or greater than 5.

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 7} \right\rbrack & \; \\{{a\; N\; p} = {\sum\limits_{i = {N - 4}}^{N - 1}\; {w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu} {E5}} \right) \\{w_{i} = \frac{\frac{1}{d\left( {{a\; N},{ai}} \right)}}{\sum_{j = {N - 4}}^{N - 1}\frac{1}{d\left( {{a\; N},{aj}} \right)}}} & \left( {{Equation}\mspace{14mu} {E6}} \right)\end{matrix}$

For example, as described above, when the three-dimensional dataencoding device generates a predicted value using distance-dependentweighted averaging, the value of d(p, q) may be 0. For example, if acurrent three-dimensional point cloud to be encoded includes twothree-dimensional points the values of the geometry informationindicating the three-dimensional positions of which are the same and thevalues of the attribute information on which are different, the value ofd(p, q) is 0. In such a case, if the three-dimensional data encodingdevice performs distance-dependent weighted averaging using theattribute information on the positions of the three-dimensional pointslocated at the same position, the value of d(p, q) is 0. Therefore, thethree-dimensional data encoding device cannot appropriately determine aweight w_(i) for weighted averaging.

To cope with this, in the case of d(p, q)=0, the three-dimensional dataencoding device can calculate a weighted average value by setting d(p,q) at 1.

In this way, even if the current three-dimensional point cloud to beencoded includes three-dimensional points the values of the geometryinformation on which are the same and the values of the attributeinformation on which are different, a weighted average value can becalculated. Therefore, the three-dimensional data encoding device cangenerate an appropriate predicted value and improve the encodingefficiency.

FIG. 106 is a diagram showing another example of attribute informationused in calculating a predicted value. It is assumed that points a2 anda2′ shown in FIG. 106 are located at the same position and havedifferent attribute information.

For example, a predicted value of attribute information on point a2shown in FIG. 106 is generated using attribute information on points a0and a1.

For example, a predicted value of attribute information on point a2′shown in FIG. 106 is generated using attribute information on points a0,a1, and a2.

For example, an example of the case where the current three-dimensionalpoint cloud to be encoded includes three-dimensional points the valuesof three-dimensional geometry information on which are the same and thevalues of attribute information on which are different may be a casewhere a three-dimensional point cloud is to be encoded that includesthree-dimensional points each having color information as attributeinformation generated by projecting the three-dimensional point onto aplurality of cameras and assigning color information from the pluralityof cameras to the three-dimensional point.

Another such example is a case where the three-dimensional data encodingdevice performs light field coding.

The predicted value is calculated by distance-dependent weightedaveraging.

For example, in the example shown in FIG. 106, predicted value a2p ofpoint a2 is calculated by weighted averaging of attribute information onpoints a0 and a1, as shown in the above equations (Equation E1) and(Equation E2).

Note that A_(i) is a value of attribute information on point ai. d(p, q)is an Euclidean distance between three-dimensional point p and point q.

For example, predicted value a2′p of point a2′ is calculated by weightedaveraging of attribute information on points a0, a1, and a2, as shown inthe following equations (Equation E7) and (Equation E8).

Here, if the three-dimensional positions of points a2 and a2′ are thesame, d(a2′, a2) is 0, and the value of w_(i) cannot be appropriatelycalculated.

To cope with this, in the case of d(a2′, a2)=0, the three-dimensionaldata encoding device performs the calculation by setting d(a2′, a2) at1.

In this way the three-dimensional data encoding device can appropriatelycalculate the value of w_(i).

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 8} \right\rbrack & \; \\{{a\; 2^{\prime}\; p} = {\sum\limits_{i = 0}^{2}\; {w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu} {E7}} \right) \\{w_{i} = \frac{\frac{1}{d\left( {{a\; 2^{\prime}}\;,{ai}} \right)}}{\sum_{j = 0}^{2}\frac{1}{d\left( {{a\; 2^{\prime}}\;,{aj}} \right)}}} & \left( {{Equation}\mspace{14mu} {E8}} \right)\end{matrix}$

For example, a predicted value aNp of point aN is calculated by weightedaveraging of attribute information on points N−4, N−3, N−2, and N−1, asshown in the above equations (Equation E5) and (Equation E6). Note thatN denotes a positive integer equal to or greater than 5.

Here, in the case of d(aN, ai)==0, that is, the positions of thethree-dimensional points are the same, the three-dimensional dataencoding device sets d(aN, ai) at 1. On the other hand, in the casewhere the relation that d(aN, ai)==0 does not hold, that is, thepositions of the three-dimensional points are not the same, thethree-dimensional data encoding device sets d(aN, ai) at d(aN, ai).

In the case of d(aN, aj)==0, that is, the positions of thethree-dimensional points are the same, the three-dimensional dataencoding device sets d(aN, aj) at 1. On the other hand, in the casewhere the relation that d(aN, aj)==0 does not hold, that is, thepositions of the three-dimensional points are not the same, thethree-dimensional data encoding device sets d(aN, aj) at d(aN, aj).

In this way the three-dimensional data encoding device can appropriatelycalculate the value of w_(i) even in the case of point aN.

Although, in the above description, the three-dimensional data encodingdevice performs the calculation by setting the distance betweenthree-dimensional points at 1 when the distance between thethree-dimensional points is 0, the present disclosure is not limitedthereto. When the distance between three-dimensional points is 0, thethree-dimensional data encoding device can set the distance between thethree-dimensional points at any value other than 0 as far as thethree-dimensional data encoding device can appropriately calculatew_(i).

In this way, the three-dimensional data encoding device can set thedenominator of the formula of w_(i) at a value other than 0 andtherefore can calculate the value of w_(i).

For example, when there is a three-dimensional point located at the sameposition as the current three-dimensional point to be encoded, thethree-dimensional data encoding device can calculate the position of thethree-dimensional point as a predicted value.

FIG. 107 is a flowchart of a three-dimensional data encoding process bythe three-dimensional data encoding device according to the presentvariation.

First, the three-dimensional data encoding device encodes geometryinformation (geometry) (S4101). For example, the three-dimensional dataencoding device may perform the encoding using an octree representation.

After the encoding of the geometry information, if the position of athree-dimensional point is changed because of quantization or the like,the three-dimensional data encoding device reassigns the attributeinformation on the original three-dimensional point to thethree-dimensional point changed in position (S4102). For example, thethree-dimensional data encoding device perform the reassignment byinterpolation of values of the attribute information according to theamount of change in position. For example, N three-dimensional pointsyet to be changed in position close to the three-dimensional position ofthe three-dimensional point changed in position are detected, and anweighted average of the values of the attribute information on the Nthree-dimensional points is taken based on the distance between thethree-dimensional position of the three-dimensional point changed inposition and each of the N three-dimensional points. Thethree-dimensional data encoding device designates the value obtained bythe weighted averaging as the value of the attribute information on thethree-dimensional point changed in position.

If the three-dimensional positions of two or more three-dimensionalpoints are changed to the same three-dimensional position because ofquantization or the like, the three-dimensional data encoding device mayassign an average value of the attribute information on the two or morethree-dimensional points yet to be changed in position as the values ofthe attribute information on the three-dimensional points changed inposition.

The three-dimensional data encoding device then encodes the reassignedattribute information (Attribute) (S4103). For example, when thethree-dimensional data encoding device encodes a plurality of kinds ofattribute information, the three-dimensional data encoding device maysequentially encode the plurality of kinds of attribute information. Forexample, when the three-dimensional data encoding device encodes colorand degree of reflection as attribute information, the three-dimensionaldata encoding device may generate a bitstream including the result ofencoding of color followed by the result of encoding of degree ofreflectance.

The order of a plurality of results of encoding of attribute informationappended to a bitstream can be any order.

The three-dimensional data encoding device may add informationindicating a starting point of the encoded data of each piece ofattribute information in the bitstream to the header or the like.

In this way, the three-dimensional data decoding device can decodeattribute information that needs to be decoded, and therefore can omitthe decoding process for attribute information that does not need to bedecoded. Therefore, the processing amount of the three-dimensional datadecoding device can be reduced.

The three-dimensional data encoding device may encode a plurality ofkinds of attribute information in parallel, and integrate the results ofthe encoding into one bitstream.

In this way, the three-dimensional data encoding device can encode aplurality of kinds of attribute information at a high speed.

FIG. 108 is a flowchart of the attribute information encoding process(S4103) shown in FIG. 107.

First, the three-dimensional data encoding device sets an LoD (S4111).That is, the three-dimensional data encoding device assigns eachthree-dimensional point to any of a plurality of LoDs.

The three-dimensional data encoding device then starts a loop on an LoDbasis (S4112). That is, the three-dimensional data encoding devicerepeatedly performs the process from step S4113 to step S4121 for eachLoD.

The three-dimensional data encoding device then starts a loop for eachthree-dimensional point (S4113). That is, the three-dimensional dataencoding device repeatedly performs the process from step S4114 to stepS4120 for each three-dimensional point at a certain LoD. Note that FIG.108 shows encoding of a current three-dimensional point P to be encoded.

The three-dimensional data encoding device then searches for a pluralityof peripheral points, which are three-dimensional points present in theperiphery of the current three-dimensional point P, that are used forcalculation of a predicted value of the current three-dimensional pointP to be processed (S4114).

The three-dimensional data encoding device then calculates a predictedvalue of the current three-dimensional point P (S4115). Specifically,the three-dimensional data encoding device calculates a weighted averageof values of the attribute information on the plurality of peripheralpoints, and sets the obtained value as the predicted value.

The three-dimensional data encoding device then calculates a predictionresidual, which is the difference between the attribute information andthe predicted value of the current three-dimensional point P (S4116).

The three-dimensional data encoding device then calculates a quantizedvalue by quantizing the prediction residual (S4117).

The three-dimensional data encoding device then arithmetically encodesthe quantized value (S4118).

The three-dimensional data encoding device then calculates an inversequantized value by inverse quantizing the quantized value (S4119).

The three-dimensional data encoding device then generates a decodedvalue by adding the predicted value to the inverse quantized value(S4120).

The three-dimensional data encoding device then ends the loop for eachthree-dimensional point (S4121).

The three-dimensional data encoding device also ends the loop for eachLoD (S4122).

FIG. 109 is a flowchart of the predicted value calculation process(S4115) shown in FIG. 108.

First, the three-dimensional data encoding device calculates a weightedaverage value of attribute values of N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point that canbe used for prediction, and assigns the calculated weighted averagevalue to prediction mode 0 (S4131).

When calculating the weight for the weighted average value, if acalculation in which the value of a denominator is 0 can occur, thethree-dimensional data encoding device may calculate the weight bysetting the value of the denominator at 1. For example, when performingthe weighted calculation using the distance d(p, q) betweenthree-dimensional points p and q, if d(p, q) is 0, the weighted averagevalue can be calculated by setting d(p, q) at 1.

In this way, even if the current three-dimensional point cloud to beencoded includes three-dimensional points the values of the geometryinformation on which are the same and the values of the attributeinformation on which are different, the three-dimensional data encodingdevice can calculate a weighted average value. Therefore, thethree-dimensional data encoding device can generate an appropriatepredicted value and improve the encoding efficiency.

Next, the three-dimensional data encoding device then calculates amaximum absolute differential value maxdiff of the attribute values ofthe N three-dimensional points in the periphery of the currentthree-dimensional point to be encoded (S4132).

The three-dimensional data encoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4133).

If the three-dimensional data encoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4133), thethree-dimensional data encoding device determines the prediction mode tobe 0 (weighted average value) (S4134).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4135).

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4133), the three-dimensional data encoding device selects a predictionmode (S4136).

The three-dimensional data encoding device then arithmetically encodesthe selected prediction mode (S4137).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4135).

In step S4137, as described above, the three-dimensional data encodingdevice may arithmetically encode the value (PredMode) of the predictionmode by binarizing the value with a truncated unary code using thenumber of prediction modes to which a predicted value is assigned.

FIG. 110 is a flowchart of the selection process for a prediction mode(S4136) shown in FIG. 109.

First, the three-dimensional data encoding device assigns attributeinformation on N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be encoded to prediction modes 1to N in ascending order of distance (S4141). For example, thethree-dimensional data encoding device generates N+1 prediction modesand assigns attribute information on N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point to beencoded to prediction modes 1 to N in ascending order of distance.

Note that, if N+1 is greater than the maximum number M (NumPredMode) ofprediction modes, which is the number of prediction modes to be added tothe bitstream, the three-dimensional data encoding device may generateup to M prediction modes.

The three-dimensional data encoding device then calculates a cost foreach prediction mode, and selects a prediction mode for which the costis minimum (S4142).

FIG. 111 is a flowchart of details of the selection process for aprediction mode (S4142) shown in FIG. 110.

First, the three-dimensional data encoding device sets i at 0 andmincost at ∞ (S4151).

The three-dimensional data encoding device then calculates a cost(cost[i]) of i-th prediction mode PredMode[i] (S4152).

The three-dimensional data encoding device then determines whether acondition that cost[i]<mincost is satisfied or not (S4153).

If the three-dimensional data encoding device determines that thecondition that cost[i]<mincost is satisfied (Yes in S4153), thethree-dimensional data encoding device sets mincost at cost[i], and setsthe prediction mode to be PredMode[i] (S4154).

Following step S4154, or if the three-dimensional data encoding devicedetermines that the condition that cost[i]<mincost is not satisfied (Noin S4153), the three-dimensional data encoding device sets i at i+1(S4155).

The three-dimensional data encoding device then determines whether acondition that i<number of prediction modes (total number of predictionmodes) is satisfied or not (S4156).

If the three-dimensional data encoding device determines that thecondition that i<number of prediction modes is satisfied (Yes in S4156),the three-dimensional data encoding device ends the selection process.If the three-dimensional data encoding device determines that thecondition that i<number of prediction modes is not satisfied (No inS4156), the process returns to step S4152.

FIG. 112 is a flowchart of a decoding process by the three-dimensionaldata decoding device according to the present variation.

The three-dimensional data decoding device decodes geometry information(geometry) on the encoded three-dimensional point (S4161). For example,the three-dimensional data decoding device may decode the geometryinformation using an octree representation.

The three-dimensional data decoding device decodes the attributeinformation on the encoded three-dimensional point (S4162).

Note that, when the three-dimensional data decoding device decodes aplurality of kinds of attribute information, the three-dimensional datadecoding device may sequentially decode the attribute information. Forexample, when the three-dimensional data decoding device decodes colorand degree of reflection as attribute information, the three-dimensionaldata decoding device may decode the bitstream including the result ofencoding of color followed by the result of encoding of degree ofreflectance in this order.

The three-dimensional data decoding device can decode the result ofencoding of the attribute information included in the bitstream in anyorder.

The three-dimensional data decoding device may be made to obtain astarting point of the encoded data of each piece of attributeinformation in the bitstream by decoding the header or the like.

In this way, the three-dimensional data decoding device can decodeattribute information that needs to be decoded. Therefore, thethree-dimensional data decoding device can omit the process of decodingattribute information that does not need to be decoded, thereby reducingthe processing amount.

The three-dimensional data decoding device may decode a plurality ofkinds of attribute information in parallel and integrate results of thedecoding into one three-dimensional point cloud.

In this way, the three-dimensional data decoding device can decode aplurality of kinds of attribute information at a high speed.

FIG. 113 is a flowchart of the decoding process for attributeinformation (S4162) shown in FIG. 112.

First, the three-dimensional data decoding device sets an LoD (S4171).That is, the three-dimensional data decoding device assigns eachthree-dimensional point to any of a plurality of LoDs.

The three-dimensional data decoding device then starts a loop on an LoDbasis (S4172). That is, the three-dimensional data decoding devicerepeatedly performs the process from step S4173 to step S4179 for eachLoD.

The three-dimensional data decoding device then starts a loop for eachthree-dimensional point (S4173). That is, the three-dimensional datadecoding device repeatedly performs the process from step S4174 to stepS4178 for each three-dimensional point at a certain LoD. FIG. 113 showsdecoding of the current three-dimensional point P to be decoded.

The three-dimensional data decoding device then searches for a pluralityof peripheral points, which are three-dimensional points present in theperiphery of the current three-dimensional point P, that are used forcalculation of a predicted value of the current three-dimensional pointP to be processed (S4174).

The three-dimensional data decoding device then calculates a predictedvalue of the current three-dimensional point P (S4175).

Next, the three-dimensional data decoding device decodes the quantizedvalue of the current three-dimensional point P (S4176)

The three-dimensional data decoding device then calculates an inversequantized value by inverse quantizing the quantized value (S4177).

The three-dimensional data decoding device then generates a decodedvalue by adding the predicted value to the inverse quantized value(S4178).

The three-dimensional data decoding device then ends the loop for eachthree-dimensional point (S4179).

The three-dimensional data decoding device also ends the loop for eachLoD (S4180).

FIG. 114 is a flowchart of details of the calculation process for apredicted value (S4175) shown in FIG. 113.

First, the three-dimensional data decoding device calculates a weightedaverage value of attribute values of N peripheral three-dimensionalpoints that are three-dimensional points in a periphery of a currentthree-dimensional point to be decoded and can be used for prediction,and assigns the calculated weighted average value to prediction mode 0(S4181).

When calculating the weight for the weighted average value, if acalculation in which the value of a denominator is 0 can occur, thethree-dimensional data decoding device may calculate the weight bysetting the value of the denominator at 1. For example, when performingthe weighted calculation using the distance d(p, q) betweenthree-dimensional points p and q, if d(p, q) is 0, the weighted averagevalue can be calculated by setting d(p, q) at 1.

In this way, even if the current three-dimensional point cloud to beencoded includes three-dimensional points the values of the geometryinformation on which are the same and the values of the attributeinformation on which are different, the three-dimensional data decodingdevice can calculate a weighted average value and generate anappropriate predicted value. Therefore, the three-dimensional datadecoding device can decode a bitstream encoded by the three-dimensionaldata encoding device with an improved encoding efficiency.

The three-dimensional data decoding device then calculates a maximumabsolute differential value maxdiff of the attribute values of the Nthree-dimensional points in the periphery of the currentthree-dimensional point to be decoded (S4182).

The three-dimensional data decoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4183).

If the three-dimensional data decoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4183), thethree-dimensional data decoding device determines the prediction mode tobe 0 (weighted average value) (S4184).

The three-dimensional data decoding device then outputs the predictedvalue of the determined prediction mode (S4185).

On the other hand, if the three-dimensional data decoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4183), the three-dimensional data decoding device decodes theprediction mode from the bitstream (S4186).

The three-dimensional data decoding device then outputs the determinedprediction mode, that is, the predicted value of the prediction modedecoded in step S4186 (S4185).

FIG. 115 is a flowchart of the prediction mode decoding process (S4186)shown in FIG. 114.

First, the three-dimensional data decoding device assigns attributeinformation on N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be decoded to prediction modes 1to N in ascending order of distance (S4191). For example, thethree-dimensional data decoding device generates N+1 prediction modes,and assigns attribute information on N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point to bedecoded to prediction modes 1 to N in ascending order of distance.

Note that, if N+1 is greater than the maximum number M (NumPredMode) ofprediction modes, which is the number of prediction modes to be added tothe bitstream, the three-dimensional data decoding device may generateup to M prediction modes.

The three-dimensional data decoding device then arithmetically decodesthe prediction mode using the number of prediction modes to which apredicted value is assigned (S4192).

FIG. 116 is a block diagram showing a configuration of attributeinformation encoder 4100 provided in the three-dimensional data encodingdevice according to the present variation. Note that FIG. 116 showsdetails of an attribute information encoder, among a geometryinformation encoder, an attribute information reassigner, and theattribute information encoder provided in the three-dimensional dataencoding device.

Attribute information encoder 4100 includes LoD generator 4101,periphery searcher 4102, predictor 4103, prediction residual calculator4104, quantizer 4105, arithmetic encoder 4106, inverse quantizer 4107,decoded value generator 4108, and memory 4109.

LoD generator 4101 generates (sets) an LoD using geometry information ona three-dimensional point.

Periphery searcher 4102 searches for a neighboring three-dimensionalpoint neighboring each three-dimensional point using a result of LoDgeneration by LoD generator 4101 and distance information indicating thedistance between three-dimensional points.

Predictor 4103 generates a predicted value of attribute information on acurrent three-dimensional point to be encoded. Specifically, predictor4103 assigns a predicted value to each of prediction modes 0 to M−1, andselects a prediction mode from prediction modes 0 to M−1 as describedabove. Predictor 4103 outputs the selected prediction mode (PredMode) toarithmetic encoder 4106.

Prediction residual calculator 4104 calculates (generates) a predictionresidual of a predicted value of attribute information.

Quantizer 4105 quantizes the prediction residual of the attributeinformation calculated by prediction residual calculator 4104.

Arithmetic encoder 4106 arithmetically encodes the prediction residualquantized by quantizer 4105. Arithmetic encoder 4106 outputs a bitstreamincluding the arithmetically encoded prediction residual to thethree-dimensional data decoding device, for example.

The prediction residual may be binarized by quantizer 4105 before beingarithmetically encoded by arithmetic encoder 4106.

Arithmetic encoder 4106 may generate various kinds of header informationand encode the generated header information.

Arithmetic encoder 4106 may obtain a prediction mode used for encodingfrom predictor 4103, arithmetically encode the obtained prediction mode,and add the arithmetically encoded prediction mode to the bitstream.

Inverse quantizer 4107 inverse quantizes the prediction residualquantized by quantizer 4105.

Decoded value generator 4108 generates a decoded value by adding thepredicted value of the attribute information generated by predictor 4103and the prediction residual inverse-quantized by inverse quantizer 4107together.

Memory 4109 is a memory that stores a value of attribute information oneach three-dimensional point decoded by decoded value generator 4108.For example, when generating a predicted value of a three-dimensionalpoint yet to be encoded, predictor 4103 may generate the predicted valueusing a decoded value of attribute information on each three-dimensionalpoint stored in memory 4109.

FIG. 117 is a block diagram showing a configuration of attributeinformation decoder 4110 provided in the three-dimensional data decodingdevice according to the present variation. Note that FIG. 117 showsdetails of an attribute information decoder, among a geometryinformation decoder and the attribute information decoder provided inthe three-dimensional data decoding device.

Attribute information decoder 4110 includes LoD generator 4111,periphery searcher 4112, predictor 4113, arithmetic decoder 4114,inverse quantizer 41015, decoded value generator 4116, and memory 4117.

LoD generator 4111 generates (sets) an LoD using geometry information ona three-dimensional point decoded by the geometry information decoder(not shown in FIG. 117).

Periphery searcher 4112 searches for a neighboring three-dimensionalpoint neighboring each three-dimensional point using a result of LoDgeneration by LoD generator 4111 and distance information indicating thedistance between three-dimensional points.

Predictor 4113 generates a predicted value of attribute information on acurrent three-dimensional point to be decoded.

Arithmetic decoder 4114 arithmetically decodes the prediction residualin the bitstream obtained from attribute information encoder 4100.

Arithmetic decoder 4114 may decode various kinds of header informationincluded in the bitstream. Arithmetic decoder 4114 may output thearithmetically decoded prediction mode (PredMode) to predictor 4113.

Inverse quantizer 4115 inverse quantizes the prediction residualarithmetically decoded by arithmetic decoder 4114.

Decoded value generator 4116 generates a decoded value by adding thepredicted value generated by predictor 4113 and the prediction residualinverse-quantized by the inverse quantizer together. Decoded valuegenerator 4116 outputs the decoded attribute information data to anotherdevice, for example.

Memory 4117 is a memory that stores a decoded value of attributeinformation on each three-dimensional point decoded by decoded valuegenerator 4116. For example, when generating a predicted value of athree-dimensional point yet to be decoded, predictor 4113 may generatethe predicted value using a decoded value of attribute information oneach three-dimensional point stored in memory 4117.

Note that the three-dimensional data encoding device may assign a newpredicted value (the new predicted value described above) to aprediction mode to which no predicted value is assigned.

For example, when the three-dimensional data encoding device binarizes avalue of a prediction mode (PredMode) with a truncated unary code usinga value of a number of prediction modes (a total number M of predictionmodes) and arithmetically encodes the binarized value, there may be aprediction mode to which no predicted value is assigned, depending onthe number of the peripheral three-dimensional points, which arethree-dimensional points that can be used for prediction of attributeinformation on a current three-dimensional point to be encoded and arelocated in the periphery of the current three-dimensional point encodedand then decoded.

For example, if the total number M of prediction modes is five, and thenumber N of peripheral three-dimensional points is two, thethree-dimensional data encoding device assigns an average value ofattribute information on the peripheral three-dimensional points toprediction mode 0 and assigns attribute values of two peripheralthree-dimensional points to prediction modes 1 and 2, respectively, aspredicted values of prediction modes. On the other hand, thethree-dimensional data encoding device assigns no predicted value toprediction modes 3 and 4.

Thus, the three-dimensional data encoding device may detect a predictionmode to which no predicted value is assigned and, if there is aprediction mode to which no predicted value is assigned, assign a newpredicted value to the prediction mode to which no predicted value isassigned.

In this way, the three-dimensional data encoding device can improve theencoding efficiency.

For example, the three-dimensional data encoding device may assign apossible median of the attribute values as a new predicted value.Alternatively, for example, if the attribute information is a degree ofreflection, and the bit precision is 8-bit precision, that is, if thedegree of reflection can assume a value from 0 to 255 as attributeinformation, the three-dimensional data encoding device may assign avalue of 127 as a predicted value. Alternatively, for example, if thebit precision of the degree of reflection is 10-bit precision, that is,if the degree of reflection can assume a value from 0 to 1023 asattribute information, the three-dimensional data encoding device mayassign a value of 511 as a predicted value. Alternatively, for example,if the attribute information is color information (for example, YUV orRGB), and Y:U:V (or R:G:B) is 8-bit 4:4:4, the three-dimensional dataencoding device may assign (127, 127, 127) to (Y, U, V) (or (R, G, B))as predicted values. Alternatively, for example, the three-dimensionaldata encoding device may assign a combination of a value of a componentof the color information, a median and 0, such as (127, 0, 0) or (0,127, 0), to (Y, U, V) (or (R, G, B)) as predicted values.

Alternatively, for example, as described above, when a prediction modeis added for each component of color information, the three-dimensionaldata encoding device may detect whether there is a prediction mode towhich no predicted value is assigned for each component and, if there isa prediction mode to which no predicted value is assigned, assign a newpredicted value to the prediction mode.

For example, if the bit precision of each component of color informationis 8-bit precision, the three-dimensional data encoding device mayassign a value of 127 as a median as a predicted value of attributeinformation for each component of color information.

Note that an example has been described in which the three-dimensionaldata encoding device assigns a median to a prediction mode as a newpredicted value, but the present disclosure is not necessarily limitedthereto. The three-dimensional data encoding device can assign anyvalue, such as the maximum value or minimum value of possible predictedvalues, to a prediction mode.

When the three-dimensional data encoding device assigns a value α (αdenotes an arbitrary constant) to a prediction mode as a new predictedvalue, the three-dimensional data encoding device can add the newlyassigned predicted value α to a header or the like of a bitstream andoutput the bitstream. For example, a three-dimensional data decodingdevice may decode the value α added to the header of the bitstream andassign the value α to a prediction mode as a new predicted value in thesame manner as in the three-dimensional data encoding device.

Note that, as described above, the three-dimensional encoding device maycalculate, as a new predicted value, a weighted average value using thedistance between three-dimensional points, and assign it to theprediction mode.

FIG. 118 is a diagram showing a table containing predicted values forprediction modes according to the present variation. (a) and (b) of FIG.118 are tables showing an example of encoding of a prediction mode(PredMode), and (c) of FIG. 118 is a table showing an example ofdecoding of the prediction mode.

As shown in (a) of FIG. 118, for example, when the total number M ofprediction modes is five, and the number of three-dimensional pointsthat can be used for prediction of a periphery of a currentthree-dimensional point to be encoded is two, the three-dimensional dataencoding device detects that no predicted value is assigned toprediction modes 3 and 4, and assigns a new predicted value toprediction modes 3 and 4. In the example shown in (a) of FIG. 118, thethree-dimensional data encoding device assigns a new predicted value(New predictor), which is an arbitrary value, to prediction mode 3 andassigns an initial value (a value of 0) to prediction mode 4.

The three-dimensional data encoding device generates the table shown in(b) of FIG. 118, which is a result of encoding with a truncated unarycode in the case where the total number M of prediction modes is fiveand is the table shown in (a) of FIG. 118 encoded with a truncated unarycode.

For example, if the three-dimensional data encoding device selectsprediction mode 3, the three-dimensional data encoding device generatesbinarized data “1110” by binarizing selected prediction mode 3 andarithmetic encoding the binarized selected prediction mode 3.

If the three-dimensional data decoding device is to assign a predictedvalue to a prediction mode in the same manner as in thethree-dimensional data encoding device, for example, thethree-dimensional data decoding device detects a prediction mode towhich no predicted value is assigned and assigns a new predicted valueto the prediction mode.

In this way as shown in (c) of FIG. 118, for example, thethree-dimensional data decoding device can correctly decode predictionmode 3 and decode the bitstream containing the new predicted value shownin (a) of FIG. 118 as a predicted value.

<Variation 2>

The three-dimensional data encoding device may calculate a predictedvalue of attribute information of a three-dimensional point from aweighted average value for N three-dimensional points (peripheralthree-dimensional points) in a periphery of a current three-dimensionalpoint to be encoded that is encoded and then decoded.

For example, the three-dimensional data encoding device performsweighted averaging using values of attribute information of the currentthree-dimensional point to be encoded and the N three-dimensional pointsin the periphery of the current three-dimensional point. When performingthe weighted averaging, the three-dimensional data encoding devicecalculates an average value of attribute values of the N peripheralthree-dimensional points in the periphery of the currentthree-dimensional point, for example. The three-dimensional dataencoding device calculates the predicted value by performing theaveraging by adding a higher weight to an attribute value closer to theaverage value.

In this way, the three-dimensional data encoding device generates thepredicted value by giving a higher precedence to a value of attributeinformation of a peripheral three-dimensional point that is closer tothe average value of the attribute values (values of attributeinformation) of the N peripheral three-dimensional points in theperiphery of the current three-dimensional point. Therefore, thethree-dimensional data encoding device can generate the predicted valueby giving a lower precedence to an attribute value farther from theaverage value, and therefore can improve the encoding efficiency.

Note that the three-dimensional data encoding device may calculate amedian of attribute values of the N peripheral three-dimensional pointsin the periphery, rather than the average value. In that case, forexample, the three-dimensional data encoding device calculates thepredicted value by performing averaging by adding a higher weight to anattribute value of a peripheral three-dimensional point that is closerto the median.

FIG. 119 is a diagram showing an example of attribute information usedin calculating a predicted value.

For example, a predicted value of attribute information on point a2shown in FIG. 119 is generated using attribute information on points a0and a1. Furthermore, for example, a predicted value of attributeinformation on point a5 shown in FIG. 119 is generated using attributeinformation on points a0, a1, a2, a3, and a4.

Note that the peripheral points selected varies with the value of Ndescribed above. For example, in the case of N=5, points a0, a1, a2, a3,and a4 are selected as peripheral points of point a5. In the case ofN=4, points a0, a1, a2, and a4 are selected based on distanceinformation.

The three-dimensional data encoding device may generate LoDs indescending order of level (beginning with LoD0, for example).Alternatively, the three-dimensional data encoding device may generateLoDs in ascending order of level (beginning with LoD2, for example).

The predicted value is calculated from an attribute value based onweighted averaging for neighboring points.

For example, in the example shown in FIG. 119, predicted value a2p ofpoint a2 is calculated by weighted averaging of attribute values ofpoints a0 and a1, as shown by the following equations (Equation F1),(Equation F2), and (Equation F3).

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 9} \right\rbrack & \; \\{{a\; 2\; p} = {\sum\limits_{i = 0}^{1}\; {w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu} {F1}} \right) \\{w_{i} = \frac{\frac{1}{{{a\; i} - {ave}}}}{\sum_{j = 0}^{1}\frac{1}{{{a\; j} - {ave}}}}} & \left( {{Equation}\mspace{14mu} {F2}} \right) \\{{ave} = \frac{\sum_{i = 1}^{1}A_{i}}{2}} & \left( {{Equation}\mspace{14mu} {F3}} \right)\end{matrix}$

Note that A_(i) is a value of attribute information on point ai. avedenotes an average value of A_(i).

Note that a median of A_(i) may be used instead of the average value.Furthermore, (ai−ave)² and (aj−ave)² may be used instead of |ai−ave| and|aj−ave|.

For example, predicted value a5p of point a5 is calculated by weightedaveraging of attribute information on points a0, a1, a2, a3, and a4, asshown by the following equations (Equation F4), (Equation F5), and(Equation F6).

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 10} \right\rbrack & \; \\{{a\; 5\; p} = {\sum\limits_{i = 0}^{4}\; {w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu} {F4}} \right) \\{w_{i} = \frac{\frac{1}{{{a\; i} - {ave}}}}{\sum_{j = 0}^{4}\frac{1}{{{a\; j} - {ave}}}}} & \left( {{Equation}\mspace{14mu} {F5}} \right) \\{{ave} = \frac{\sum_{i = 1}^{5}A_{i}}{5}} & \left( {{Equation}\mspace{14mu} {F6}} \right)\end{matrix}$

Here, if the value of ai and the value of ave are the same, |ai−ave| is0, and it is difficult to appropriately calculate the value of w_(i). Tocope with this, when |ai−ave| is 0, for example, the three-dimensionaldata encoding device performs the calculation by setting |ai−ave| at 1.

In this way, the three-dimensional data encoding device can calculatethe value of w_(i).

If the value of aj and the value of ave are the same, |aj−ave| is 0, andit is difficult to appropriately calculate the value of w_(i). To copewith this, when |aj−ave| is 0, for example, the three-dimensional dataencoding device performs the calculation by setting |aj−ave| at 1.

In this way, the three-dimensional data encoding device can calculatethe value of w_(i).

Predicted value aNp of point aN is calculated by weighted averaging ofattribute information on points N−4, N−3, N−2, and N−1, as shown by thefollowing equations (Equation F7), (Equation F8), and (Equation F9).Note that N denotes a positive integer equal to or greater than 5.

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 11} \right\rbrack & \; \\{{a\; N\; p} = {\sum\limits_{i = {N - 4}}^{N - 1}\; {w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu} {F7}} \right) \\{w_{i} = \frac{\frac{1}{{{a\; i} - {ave}}}}{\sum_{j = {N - 4}}^{N - 1}\frac{1}{{{a\; j} - {ave}}}}} & \left( {{Equation}\mspace{14mu} {F8}} \right) \\{{ave} = \frac{\sum_{i = {N - 4}}^{N - 1}A_{i}}{4}} & \left( {{Equation}\mspace{14mu} {F9}} \right)\end{matrix}$

For example, the three-dimensional data encoding device performs thecalculation by setting |ai−ave| at 1 in the case of |ai−ave|==0, andperforms the calculation by setting |ai−ave| at |ai-ave| otherwise.

For example, the three-dimensional data encoding device performs thecalculation by setting |aj−ave| at 1 in the case of |aj−ave|==0, andperforms the calculation by setting |aj−ave| at |aj−ave| otherwise.

Note that the three-dimensional data encoding device may perform theweighted averaging using distance information between a currentthree-dimensional point to be encoded and each of N three-dimensionalpoints in a periphery of the current three-dimensional point, and valuesof attribute values of the N peripheral three-dimensional points. Inperforming the weighted averaging, the three-dimensional data encodingdevice calculates an average value for each of the distance informationand the attribute values of the N peripheral three-dimensional points inthe periphery of the current three-dimensional point, for example. Thethree-dimensional data encoding device calculates the predicted value bytaking an average by adding a higher weight to a value closer to theaverage value, for example.

In this way, the three-dimensional data encoding device can generate apredicted value by giving a higher precedence to a value of attributeinformation of a peripheral three-dimensional point that is closer indistance to the current three-dimensional point to be encoded and avalue of attribute information of a peripheral three-dimensional pointthat is closer to the average value of the attribute values of the Nperipheral three-dimensional points in the periphery, and therefore canimprove the encoding efficiency.

Note that the three-dimensional data encoding device may calculate amedian of attribute values of the N peripheral three-dimensional pointsin the periphery, rather than the average value. In that case, forexample, the three-dimensional data encoding device calculates thepredicted value by performing averaging by adding a higher weight to anattribute value of a peripheral three-dimensional point that is closerto the median.

For example, a predicted value of attribute information of point a2shown in FIG. 119 is generated using attribute information on points a0and a1. For example, a predicted value of attribute information on pointa5 shown in FIG. 119 is generated using attribute information on pointsa0, a1, a2, a3, and a4.

Note that the peripheral points selected vary with the value of Ndescribed above. For example, in the case of N=5, points a0, a1, a2, a3,and a4 are selected as peripheral points of point a5. In the case ofN=4, points a0, a1, a2, and a4 are selected based on distanceinformation.

The three-dimensional data encoding device may generate LoDs indescending order of level (beginning with LoD0, for example).Alternatively, the three-dimensional data encoding device may generateLoDs in ascending order of level (beginning with LoD2, for example).

The predicted value is calculated by distance-dependent and attributevalue-dependent weighted averaging.

For example, in the example shown in FIG. 119, predicted value a2p ofpoint a2 is calculated by weighted averaging of distance information andattribute information on points a0 and a1 as shown in the aboveequations (Equation F1) and (Equation F3) and the following equation(Equation F10).

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 12} \right\rbrack & \; \\{w_{i} = \frac{\frac{1}{d\left( {{a\; 2},{ai}} \right)} \times \frac{1}{{{a\; i} - {ave}}}}{\sum_{j = 0}^{1}{\frac{1}{d\left( {{a\; 2},{aj}} \right)} \times \frac{1}{{{a\; j} - {ave}}}}}} & \left( {{Equation}\mspace{14mu} {F10}} \right)\end{matrix}$

Note that A_(i) is a value of attribute information on point ai. ave isan average value of A_(i).

Note that a median of A_(i) may be used instead of the average value.Furthermore, (ai−ave)² and (aj−ave)² may be used instead of |ai−ave| and|aj−ave|.

For example, predicted value a5p of point a5 is calculated by weightedaveraging of distance information and attribute information on pointsa0, a1, a2, a3, and a4, as shown by the above equations (Equation F4)and (Equation F6) and the following equation (Equation F11).

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 13} \right\rbrack & \; \\{w_{i} = \frac{\frac{1}{d\left( {{a\; 5},{ai}} \right)} \times \frac{1}{{{a\; i} - {ave}}}}{\sum_{j = 0}^{4}{\frac{1}{d\left( {{a\; 5},{aj}} \right)} \times \frac{1}{{{a\; j} - {ave}}}}}} & \left( {{Equation}\mspace{14mu} {F11}} \right)\end{matrix}$

Here, if the value of ai and the value of ave are the same, |ai−ave| is0, and it is difficult to appropriately calculate the value of w_(i). Tocope with this, when |ai−ave| is 0, for example, the three-dimensionaldata encoding device performs the calculation by setting |ai−ave| at 1.

In this way, the three-dimensional data encoding device can calculatethe value of w_(i).

If the value of aj and the value of ave are the same, |aj−ave| is 0, andit is difficult to appropriately calculate the value of w_(i). To copewith this, when |aj−ave| is 0, for example, the three-dimensional dataencoding device performs the calculation by setting |aj−ave| at 1.

In this way, the three-dimensional data encoding device can calculatethe value of w_(i).

Predicted value aNp of point aN is calculated by weighted averaging ofattribute information on points N−4, N−3, N−2, and N−1, as shown by theabove equations (Equation F7) and (Equation F9) and the followingequation (Equation F12). Note that N denotes a positive integer equal toor greater than 5.

$\begin{matrix}\left\lbrack {{Math}.\mspace{11mu} 14} \right\rbrack & \; \\{w_{i} = \frac{\frac{1}{d\left( {{a\; N},{ai}} \right)} \times \frac{1}{{{a\; i} - {ave}}}}{\sum_{j = {N - 4}}^{N - 1}{\frac{1}{d\left( {{a\; N},{aj}} \right)} \times \frac{1}{{{a\; j} - {ave}}}}}} & \left( {{Equation}\mspace{14mu} {F12}} \right)\end{matrix}$

For example, the three-dimensional data encoding device performs thecalculation by setting |ai−ave| at 1 in the case of |ai−ave|==0, andperforms the calculation by setting |ai−ave| at |ai−ave| otherwise.

For example, the three-dimensional data encoding device performs thecalculation by setting |aj−ave| at 1 in the case of |aj−ave|==0, andperforms the calculation by setting |aj−ave| at |aj−ave| otherwise.

For example, the three-dimensional data encoding device performs thecalculation by setting d(aN, ai) at 1 in the case of d(aN, ai)==0, andperforms the calculation by setting d(aN, ai) at d(aN, ai) otherwise.

For example, the three-dimensional data encoding device performs thecalculation by setting d(aN, aj) at 1 in the case of d(aN, aj)==0, andperforms the calculation by setting d(aN, aj) at d(aN, aj) otherwise.

FIG. 120 is a flowchart of a three-dimensional data encoding process bythe three-dimensional data encoding device according to the presentvariation.

First, the three-dimensional data encoding device encodes geometryinformation (geometry) (S4201). For example, the three-dimensional dataencoding device may perform the encoding using an octree representation.

After the encoding of the geometry information, if the position of athree-dimensional point is changed because of quantization or the like,the three-dimensional data encoding device reassigns the attributeinformation on the original three-dimensional point to thethree-dimensional point changed in position (S4202). For example, thethree-dimensional data encoding device perform the reassignment byinterpolation of values of the attribute information according to theamount of change in position. For example, N three-dimensional pointsyet to be changed in position close to the three-dimensional position ofthe three-dimensional point changed in position are detected, and anweighted average of the values of the attribute information on the Nthree-dimensional points is taken based on the distance between thethree-dimensional position of the three-dimensional point changed inposition and each of the N three-dimensional points. Thethree-dimensional data encoding device designates the value obtained bythe weighted averaging as the value of the attribute information on thethree-dimensional point changed in position.

If the three-dimensional positions of two or more three-dimensionalpoints are changed to the same three-dimensional position because ofquantization or the like, the three-dimensional data encoding device mayassign an average value of the attribute information on the two or morethree-dimensional points yet to be changed in position as the values ofthe attribute information on the three-dimensional points changed inposition.

The three-dimensional data encoding device then encodes the reassignedattribute information (Attribute) (S4203). For example, when thethree-dimensional data encoding device encodes a plurality of kinds ofattribute information, the three-dimensional data encoding device maysequentially encode the plurality of kinds of attribute information. Forexample, when the three-dimensional data encoding device encodes colorand degree of reflection as attribute information, the three-dimensionaldata encoding device may generate a bitstream including the result ofencoding of color followed by the result of encoding of degree ofreflectance.

The order of a plurality of results of encoding of attribute informationappended to a bitstream can be any order.

The three-dimensional data encoding device may add informationindicating a starting point of the encoded data of each piece ofattribute information in the bitstream to the header or the like.

In this way, the three-dimensional data decoding device can decodeattribute information that needs to be decoded, and therefore can omitthe decoding process for attribute information that does not need to bedecoded. Therefore, the processing amount of the three-dimensional datadecoding device can be reduced.

The three-dimensional data encoding device may encode a plurality ofkinds of attribute information in parallel, and integrate the results ofthe encoding into one bitstream.

In this way, the three-dimensional data encoding device can encode aplurality of kinds of attribute information at a high speed.

FIG. 121 is a flowchart of the attribute information encoding process(S4203) shown in FIG. 120.

First, the three-dimensional data encoding device sets an LoD (S4211).That is, the three-dimensional data encoding device assigns eachthree-dimensional point to any of a plurality of LoDs.

The three-dimensional data encoding device then starts a loop on an LoDbasis (S4212). That is, the three-dimensional data encoding devicerepeatedly performs the process from step S4213 to step S4221 for eachLoD.

The three-dimensional data encoding device then starts a loop for eachthree-dimensional point (S4213). That is, the three-dimensional dataencoding device repeatedly performs the process from step S4214 to stepS4220 for each three-dimensional point at a certain LoD. Note that FIG.121 shows encoding of a current three-dimensional point P to be encoded.

The three-dimensional data encoding device then searches for a pluralityof peripheral points, which are three-dimensional points present in theperiphery of the current three-dimensional point P, that are used forcalculation of a predicted value of the current three-dimensional pointP to be processed (S4214).

The three-dimensional data encoding device then calculates a predictedvalue of the current three-dimensional point P (S4215). Specifically,the three-dimensional data encoding device calculates a weighted averageof values of the attribute information on the plurality of peripheralpoints, and sets the obtained value as the predicted value.

The three-dimensional data encoding device then calculates a predictionresidual, which is the difference between the attribute information andthe predicted value of the current three-dimensional point P (S4216).

The three-dimensional data encoding device then calculates a quantizedvalue by quantizing the prediction residual (S4217).

The three-dimensional data encoding device then arithmetically encodesthe quantized value (S4218).

The three-dimensional data encoding device then calculates an inversequantized value by inverse quantizing the quantized value (S4219).

The three-dimensional data encoding device then generates a decodedvalue by adding the predicted value to the inverse quantized value(S4220).

The three-dimensional data encoding device then ends the loop for eachthree-dimensional point (S4221).

The three-dimensional data encoding device also ends the loop for eachLoD (S4222).

FIG. 122 is a flowchart of the predicted value calculation process(S4215) shown in FIG. 121.

First, the three-dimensional data encoding device calculates a weightedaverage value of attribute values of N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point that canbe used for prediction, and assigns the calculated weighted averagevalue to prediction mode 0 (S4231).

Note that the three-dimensional data encoding device may calculate apredicted value of attribute information on a three-dimensional pointfrom a weighted average value of attribute values of N peripheralthree-dimensional points in the periphery encoded and then decoded. Forexample, the three-dimensional data encoding device performs theweighted averaging using distance information between the currentthree-dimensional point to be encoded and each of the N peripheralthree-dimensional points in the periphery of the currentthree-dimensional point and values of attribute information thereof. Inperforming the weighted averaging, the three-dimensional data encodingdevice adds a higher weight to a point closer in distance to the currentthree-dimensional point to be encoded, for example. Alternatively, forexample, the three-dimensional data encoding device calculates anaverage value of attribute values of N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point, andperforms the averaging by adding a higher weight to an attribute valuecloser to the average value. The three-dimensional data encoding devicecalculates the predicted value in this way, for example.

Next, the three-dimensional data encoding device then calculates amaximum absolute differential value maxdiff of the attribute values ofthe N three-dimensional points in the periphery of the currentthree-dimensional point to be encoded (S4232).

The three-dimensional data encoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4233).

If the three-dimensional data encoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4233), thethree-dimensional data encoding device determines the prediction mode tobe 0 (weighted average value) (S4234).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4235).

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4233), the three-dimensional data encoding device selects a predictionmode (S4236).

The three-dimensional data encoding device then arithmetically encodesthe selected prediction mode (S4237).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4235).

In step S4237, as described above, the three-dimensional data encodingdevice may arithmetically encode the prediction mode (PredMode) bybinarizing the value with a truncated unary code using the number ofprediction modes to which a predicted value is assigned.

FIG. 123 is a flowchart of the selection process for a prediction mode(S4236) shown in FIG. 122.

First, the three-dimensional data encoding device assigns attributeinformation on N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be encoded to prediction modes 1to N in ascending order of distance (S4241). For example, thethree-dimensional data encoding device generates N+1 prediction modesand assigns attribute information on N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point to beencoded to prediction modes 1 to N in ascending order of distance.

Note that, if N+1 is greater than the maximum number M (NumPredMode) ofprediction modes, which is the number of prediction modes to be added tothe bitstream, the three-dimensional data encoding device may generateup to M prediction modes.

The three-dimensional data encoding device then calculates a cost foreach prediction mode, and selects a prediction mode for which the costis minimum (S4242).

FIG. 124 is a flowchart of details of the selection process for aprediction mode (S4242) shown in FIG. 123.

First, the three-dimensional data encoding device sets i at 0 andmincost at ∞ (S4251).

The three-dimensional data encoding device then calculates a cost(cost[i]) of i-th prediction mode PredMode[i] (S4252).

The three-dimensional data encoding device then determines whether acondition that cost[i]<mincost is satisfied or not (S4253).

If the three-dimensional data encoding device determines that thecondition that cost[i]<mincost is satisfied (Yes in S4253), thethree-dimensional data encoding device sets mincost at cost[i], and setsthe prediction mode to be PredMode[i] (S4254).

Following step S4254, or if the three-dimensional data encoding devicedetermines that the condition that cost[i]<mincost is not satisfied (Noin S4153), the three-dimensional data encoding device sets i at i+1(S4255).

The three-dimensional data encoding device then determines whether acondition that i<number of prediction modes (total number of predictionmodes) is satisfied or not (S4256).

If the three-dimensional data encoding device determines that thecondition that i<number of prediction modes is not satisfied (No inS4256), the three-dimensional data encoding device ends the selectionprocess. If the three-dimensional data encoding device determines thatthe condition that i<number of prediction modes is satisfied (Yes inS4256), the process returns to step S4252.

FIG. 125 is a flowchart of a decoding process by the three-dimensionaldata decoding device according to the present variation.

The three-dimensional data decoding device decodes geometry information(geometry) on the encoded three-dimensional point (S4261). For example,the three-dimensional data decoding device may decode the geometryinformation using an octree representation.

The three-dimensional data decoding device decodes the attributeinformation on the encoded three-dimensional point (S4262).

Note that, when the three-dimensional data decoding device decodes aplurality of kinds of attribute information, the three-dimensional datadecoding device may sequentially decode the attribute information. Forexample, when the three-dimensional data decoding device decodes colorand degree of reflection as attribute information, the three-dimensionaldata decoding device may decode the bitstream including the result ofencoding of color followed by the result of encoding of degree ofreflectance in this order.

The three-dimensional data decoding device can decode the result ofencoding of the attribute information included in the bitstream in anyorder.

The three-dimensional data decoding device may be made to obtain astarting point of the encoded data of each piece of attributeinformation in the bitstream by decoding the header or the like.

In this way, the three-dimensional data decoding device can decodeattribute information that needs to be decoded. Therefore, thethree-dimensional data decoding device can omit the process of decodingattribute information that does not need to be decoded, thereby reducingthe processing amount.

The three-dimensional data decoding device may decode a plurality ofkinds of attribute information in parallel and integrate results of thedecoding into one three-dimensional point cloud.

In this way, the three-dimensional data decoding device can decode aplurality of kinds of attribute information at a high speed.

FIG. 126 is a flowchart of the decoding process for attributeinformation (S4262) shown in FIG. 125.

First, the three-dimensional data decoding device sets an LoD (S4271).That is, the three-dimensional data decoding device assigns eachthree-dimensional point to any of a plurality of LoDs.

The three-dimensional data decoding device then starts a loop on an LoDbasis (S4272). That is, the three-dimensional data decoding devicerepeatedly performs the process from step S4273 to step S4279 for eachLoD.

The three-dimensional data decoding device then starts a loop for eachthree-dimensional point (S4273). That is, the three-dimensional datadecoding device repeatedly performs the process from step S4274 to stepS4278 for each three-dimensional point at a certain LoD. FIG. 126 showsdecoding of the current three-dimensional point P to be decoded.

The three-dimensional data decoding device then searches for a pluralityof peripheral points, which are three-dimensional points present in theperiphery of the current three-dimensional point P, that are used forcalculation of a predicted value of the current three-dimensional pointP to be processed (S4274).

The three-dimensional data decoding device then calculates a predictedvalue of the current three-dimensional point P (S4275).

Next, the three-dimensional data decoding device decodes the quantizedvalue of the current three-dimensional point P (S4276)

The three-dimensional data decoding device then calculates an inversequantized value by inverse quantizing the quantized value (S4277).

The three-dimensional data decoding device then generates a decodedvalue by adding the predicted value to the inverse quantized value(S4278).

The three-dimensional data decoding device then ends the loop for eachthree-dimensional point (S4279).

The three-dimensional data decoding device also ends the loop for eachLoD (S4280).

FIG. 127 is a flowchart of details of the calculation process for apredicted value (S4275) shown in FIG. 126.

First, the three-dimensional data decoding device calculates a weightedaverage value of attribute values of N peripheral three-dimensionalpoints that are three-dimensional points in a periphery of a currentthree-dimensional point to be decoded and can be used for prediction,and assigns the calculated weighted average value to prediction mode 0(S4281).

Note that the three-dimensional data decoding device may calculate apredicted value of attribute information on a three-dimensional pointfrom a weighted average value for N peripheral three-dimensional pointsin the periphery encoded and then decoded. For example, thethree-dimensional data decoding device performs the weighted averagingusing distance information between the current three-dimensional pointto be decoded and each of the N peripheral three-dimensional points inthe periphery of the current three-dimensional point and values ofattribute information thereof. In performing the weighted averaging, thethree-dimensional data decoding device adds a higher weight to a pointcloser in distance to the current three-dimensional point to be decoded,for example. Alternatively, for example, the three-dimensional datadecoding device calculates an average value of attribute values of Nperipheral three-dimensional points in the periphery of the currentthree-dimensional point, and performs the averaging by adding a higherweight to an attribute value closer to the average value. Thethree-dimensional data decoding device calculates the predicted value inthis way, for example.

The three-dimensional data decoding device may be able to decode abitstream generated by the encoding described above.

The three-dimensional data decoding device then calculates a maximumabsolute differential value maxdiff of the attribute values of the Nthree-dimensional points in the periphery of the currentthree-dimensional point to be decoded (S4282).

The three-dimensional data decoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4283).

If the three-dimensional data decoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4283), thethree-dimensional data decoding device determines the prediction mode tobe 0 (weighted average value) (S4284).

The three-dimensional data decoding device then outputs the predictedvalue of the determined prediction mode (S4285).

On the other hand, if the three-dimensional data decoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4283), the three-dimensional data decoding device decodes theprediction mode from the bitstream (S4286).

The three-dimensional data decoding device then outputs the determinedprediction mode, that is, the predicted value of the prediction modedecoded in step S4286 (S4285).

FIG. 128 is a flowchart of the prediction mode decoding process (S4286)shown in FIG. 127.

First, the three-dimensional data decoding device assigns attributeinformation on N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be decoded to prediction modes 1to N in ascending order of distance (S4291). For example, thethree-dimensional data decoding device generates N+1 prediction modes,and assigns attribute information on N peripheral three-dimensionalpoints in the periphery of the current three-dimensional point to bedecoded to prediction modes 1 to N in ascending order of distance.

Note that, if N+1 is greater than the maximum number M (NumPredMode) ofprediction modes, which is the number of prediction modes to be added tothe bitstream, the three-dimensional data decoding device may generateup to M prediction modes.

The three-dimensional data decoding device then arithmetically decodesthe prediction mode using the number of prediction modes to which apredicted value is assigned (S4292).

Note that the three-dimensional data encoding device may assign a newpredicted value (the new predicted value described above) to aprediction mode to which no predicted value is assigned.

For example, when the three-dimensional data encoding device binarizes avalue of a prediction mode (PredMode) with a truncated unary code usinga value of a number of prediction modes (a total number M of predictionmodes) and arithmetically encodes the binarized value, there may be aprediction mode to which no predicted value is assigned, depending onthe number of the peripheral three-dimensional points, which arethree-dimensional points that can be used for prediction of attributeinformation on a current three-dimensional point to be encoded and arelocated in the periphery of the current three-dimensional point encodedand then decoded.

For example, if the total number M of prediction modes is five, and thenumber N of peripheral three-dimensional points is two, thethree-dimensional data encoding device assigns an average value ofattribute information on the peripheral three-dimensional points toprediction mode 0 and assigns attribute values of two peripheralthree-dimensional points to prediction modes 1 and 2, respectively, aspredicted values of prediction modes. On the other hand, thethree-dimensional data encoding device assigns no predicted value toprediction modes 3 and 4.

Thus, the three-dimensional data encoding device may detect a predictionmode to which no predicted value is assigned and, if there is aprediction mode to which no predicted value is assigned, assign a newpredicted value to the prediction mode to which no predicted value isassigned.

In this way, the three-dimensional data encoding device can improve theencoding efficiency.

For example, the three-dimensional data encoding device may assign apossible median of the attribute values as a new predicted value.Alternatively, for example, if the attribute information is a degree ofreflection, and the bit precision is 8-bit precision, that is, if thedegree of reflection can assume a value from 0 to 255 as attributeinformation, the three-dimensional data encoding device may assign avalue of 127 as a predicted value. Alternatively for example, if the bitprecision of the degree of reflection is 10-bit precision, that is, ifthe degree of reflection can assume a value from 0 to 1023 as attributeinformation, the three-dimensional data encoding device may assign avalue of 511 as a predicted value. Alternatively, for example, if theattribute information is color information (for example, YUV or RGB),and Y:U:V (or R:G:B) is 8-bit 4:4:4, the three-dimensional data encodingdevice may assign (127, 127, 127) to (Y, U, V) (or (R, G, B)) aspredicted values. Alternatively, for example, the three-dimensional dataencoding device may assign a combination of a value of a component ofthe color information, a median and 0, such as (127, 0, 0) or (0, 127,0), to (Y, U, V) (or (R, G, B)) as predicted values.

Alternatively, for example, as described above, when a prediction modeis added for each component of color information, the three-dimensionaldata encoding device may detect whether there is a prediction mode towhich no predicted value is assigned for each component and, if there isa prediction mode to which no predicted value is assigned, assign a newpredicted value to the prediction mode.

For example, if the bit precision of each component of color informationis 8-bit precision, the three-dimensional data encoding device mayassign a value of 127 as a median as a predicted value of attributeinformation for each component of color information.

Note that an example has been described in which the three-dimensionaldata encoding device assigns a median to a prediction mode as a newpredicted value, but the present disclosure is not necessarily limitedthereto. The three-dimensional data encoding device can assign anyvalue, such as the maximum value or minimum value of possible predictedvalues.

When the three-dimensional data encoding device assigns a value α (αdenotes an arbitrary constant) to a prediction mode as a new predictedvalue, the three-dimensional data encoding device can add the newlyassigned predicted value α to a header or the like of a bitstream andoutput the bitstream. For example, a three-dimensional data decodingdevice may decode the value α added to the header of the bitstream andassign the value α to a prediction mode as a new predicted value in thesame manner as in the three-dimensional data encoding device.

Note that, as described above, the three-dimensional encoding device mayadd, as a new predicted value to the prediction mode, a weighted averagevalue obtained using values of attribute information of the N peripheralthree-dimensional points in the periphery of the currentthree-dimensional point to be encoded or a weighted average valueobtained using distance information and values of attribute informationof each of the N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be encoded.

FIG. 129 is a diagram showing a table containing predicted values forprediction modes according to the present variation. (a) and (b) of FIG.129 are tables showing an example of encoding of a prediction mode(PredMode), and (c) of FIG. 129 is a table showing an example ofdecoding of the prediction mode.

As shown in (a) of FIG. 129, for example, when the total number M ofprediction modes is five, and the number of three-dimensional pointsthat can be used for prediction of a periphery of a currentthree-dimensional point to be encoded is two, the three-dimensional dataencoding device detects that no predicted value is assigned toprediction modes 3 and 4, and assigns a new predicted value toprediction modes 3 and 4. In the example shown in (a) of FIG. 129, thethree-dimensional data encoding device assigns a new predicted value(New predictor), which is an arbitrary value, to prediction mode 3 andassigns an initial value (a value of 0) to prediction mode 4.

The three-dimensional data encoding device generates the table shown in(b) of FIG. 129, which is a result of encoding with a truncated unarycode in the case where the total number M of prediction modes is fiveand is the table shown in (a) of FIG. 129 encoded with a truncated unarycode.

For example, if the three-dimensional data encoding device selectsprediction mode 3, the three-dimensional data encoding device generatesbinarized data “1110” by binarizing selected prediction mode 3 andarithmetic encoding the binarized result.

If the three-dimensional data decoding device is to assign a predictedvalue to a prediction mode in the same manner as in thethree-dimensional data encoding device, for example, thethree-dimensional data decoding device detects a prediction mode towhich no predicted value is assigned and assigns a new predicted valueto the prediction mode.

In this way, as shown in (c) of FIG. 129, for example, thethree-dimensional data decoding device can correctly decode predictionmode 3 and decode the bitstream containing the new predicted value shownin (a) of FIG. 129 as a predicted value.

<Variation 3>

In the above description, in generating predicted values of attributeinformation on three-dimensional points by providing a prediction mode(PredMode) to each three-dimensional point, as an example of a method ofassigning a predicted value to each prediction mode, an example has beendescribed in which an attribute value of a three-dimensional point in aperiphery of a current three-dimensional point to be encoded is assignedas a predicted value based on distance information from a currentthree-dimensional point to be encoded. However, the method of assigninga predicted value to a prediction mode is not necessarily limitedthereto. For example, the three-dimensional data encoding device maymodify the method of assigning a predicted value to a prediction mode insome way.

For example, the three-dimensional data encoding device may calculate amedian (median value) from a predicted value assigned to each predictionmode and assign the median to a prediction mode of a small value, suchas assigning the median to prediction mode 0.

In this way, the three-dimensional data encoding device can generate apredicted value candidate by giving precedence to the median ofattribute values of peripheral three-dimensional points, and thereforecan improve the encoding efficiency.

Note that although an example in which the median is used has been shownas a method of assigning a predicted value to a prediction mode in theabove description, the present disclosure is not necessarily limitedthereto. For example, the three-dimensional data encoding device maycalculate an average value of attribute values of peripheralthree-dimensional points from the predicted value assigned to eachprediction mode, and assign a predicted value close to the calculatedaverage value to prediction mode 0.

In this way, the three-dimensional data encoding device can generate apredicted value candidate by giving precedence to an attribute valueclose to the average value of attribute values of peripheralthree-dimensional points, and therefore can improve the encodingefficiency.

FIG. 130 is a diagram showing a first example of a table containingpredicted values for prediction modes according to the presentvariation. (a) of FIG. 130 is a table showing an example of an initialstate of the predicted values assigned to the prediction modes, and (b)of FIG. 130 is a table showing an example in which assignment of thepredicted values to the prediction modes is modified from the stateshown in (a) of FIG. 130. The tables shown in FIG. 130 are tables in acase where the total number M of prediction modes is 4, and the numberof three-dimensional points in the periphery of the currentthree-dimensional point to be encoded that can be used for prediction is4.

FIG. 131 is a diagram showing an example of attribute information usedin calculating a predicted value. In the example in FIG. 131, it isassumed that point b1 is the closest to a current three-dimensionalpoint to be encoded (here, point b2), point a2 is the second closest tothe current three-dimensional point, point a1 is the third closest tothe current three-dimensional point, and point a0 is the fourth closestto the current three-dimensional point.

For example, in the example shown in FIG. 131, the three-dimensionaldata encoding device calculates a predicted value of point b2 based onpoint a0, point a1, point a2, and point b1. Here, as shown in (a) ofFIG. 130, the three-dimensional data encoding device calculatesattribute values of points b1, a2, a1, and a0 as predicted values(simply shown as b1, a2, a1, and a0 in FIG. 130), which are candidatesof the predicted value of point b2.

For example, the three-dimensional data encoding device sequentiallyassigns predicted values to prediction modes, beginning with predictionmode 0, that is, beginning with the prediction mode of the smallestvalue, in ascending order of distance to the current three-dimensionalpoint.

Here, it is assumed that the predicted values are related in magnitudeaccording to b1>a1>a0>a2.

In this case, the three-dimensional data encoding device calculates amedian value of the predicted values, for example. Here, it is assumedthat a1 is a median value.

In this case, as shown in (b) of FIG. 130, the three-dimensional dataencoding device assigns predicted value a1 selected as a median value toprediction mode 0, and assigns predicted value b1 having been originallyassigned to prediction mode 0 to prediction mode 2 to which predictedvalue a1 selected as a median has been assigned. That is, thethree-dimensional data encoding device interchanges the predicted valueassigned to prediction mode 0 and the predicted value assigned toprediction mode 2.

In this way, the three-dimensional data encoding device can generate apredicted value candidate by giving precedence to the median value ofthe attribute values of the peripheral three-dimensional points, whichis most likely to be used as a predicted value, and therefore canimprove the encoding efficiency.

As described above, the three-dimensional data encoding devicecalculates a median (median value) of the predicted values, andinterchanges predicted values assigned to prediction modes based on thecalculation result.

For example, the three-dimensional data encoding device rearranges npredicted values assigned to the prediction modes in ascending order ordescending order. In this case, the three-dimensional data encodingdevice further modifies the assignment of predicted values so that ann/2-th value is the median value.

Note that the three-dimensional data encoding device may change themethod of calculating the median value depending on whether the value ofn is odd or even.

For example, when n is odd, after rearranging the predicted values inascending order or descending order as described above, thethree-dimensional data encoding device designates an n/2-th (thefractional portion is dropped, for example) predicted value among 0-thto n−1-th predicted values as a median value.

For example, when n is even, after rearranging the predicted values inascending order or descending order as described above, thethree-dimensional data encoding device designates (n/2)−1-th and n/2-thpredicted values among 0-th to n−1-th predicted values as median valuecandidates A and B, and then designates any of A and B as a median valuein some manner. For example, the three-dimensional data encoding devicedesignates one of A and B that is closer in distance to the currentthree-dimensional point to be encoded as a median value.

For example, in the example shown in FIGS. 130 and 131, since n=4, thethree-dimensional data encoding device calculates a median value in themedian value calculation method in the case where n is even describedabove.

Specifically, the three-dimensional data encoding device rearrangespoints b1, a1, a0, and a2 in ascending order, for example. Morespecifically the three-dimensional data encoding device rearranges thepoints in a sequence of points a2, a0, a1, and b1. In this case, the(n/2−1)-th point is point a0, and the n/2-th point is point a1. Thethree-dimensional data encoding device first designates attribute valuesof these points a0 and a1 as median value candidates A and B. Thethree-dimensional data encoding device then compares the distanceinformation on points a0 and a1. In this case, point a1 is closer topoint b1, which is the current three-dimensional point to be encoded,than point a0, so that the three-dimensional data encoding deviceselects the attribute value of point a1 as a median value and furtherrearranges the points.

Note that the three-dimensional data encoding device may first calculatea median value of attribute values of peripheral three-dimensionalpoints and assign the median to prediction mode 0, and then assign theattribute values of the peripheral three-dimensional points other thanthe median value to prediction mode 1 and the following prediction modesbased on the distance information.

The three-dimensional data encoding device may add information onwhether to give precedence to the median value (median precedenceinformation) to the header or the like. In that case, thethree-dimensional data encoding device assigns the median value toprediction mode 0 in the manner described above if the informationindicates that precedence is to be given to the median value, andassigns predicted values to prediction modes regardless of the value ofthe median value otherwise.

In this way, the three-dimensional data encoding device can perform theencoding by adaptively switching the predicted value assignment mannerdepending on whether precedence is given to the median value or not.Therefore, the three-dimensional data encoding device can improve theencoding efficiency.

The three-dimensional data decoding device can appropriately decode thebitstream based on the median precedence information added to the headeror the like.

Note that, in the above description, the three-dimensional data encodingdevice assigns the median value to prediction mode 0 and assigns thepredicted value having been originally assigned to prediction mode 0 tothe prediction mode to which the median value has been originallyassigned, as a process of modifying the assignment of the predictedvalues by giving precedence to the median value. However, the process ofmodifying the assignment of the predicted values performed by thethree-dimensional data encoding device is not necessarily limitedthereto.

For example, the three-dimensional data encoding device may shift thepredicted values assigned to the prediction modes until a value isassigned again to the prediction mode to which the median value has beenoriginally assigned, such as assigning the median value to predictionmode 0, assigning the predicted value having been originally assigned toprediction mode 0 to prediction mode 1, and assigning the predictedvalue having been originally assigned to prediction mode 1 to predictionmode 2.

FIG. 132 is a diagram showing a second example of the table containingpredicted values for prediction modes according to the presentvariation. (a) of FIG. 132 is a table showing an example of an initialstate of the predicted values assigned to the prediction modes, and (b)of FIG. 132 is a table showing an example in which assignment of thepredicted values to the prediction modes is modified from the stateshown in (a) of FIG. 132. The tables shown in FIG. 132 are tables in acase where the total number M of prediction modes is 4, and the numberof three-dimensional points in the periphery of the currentthree-dimensional point to be encoded that can be used for prediction is4.

It is assumed that the positional relationship between the points andthe attribute values of the points are the same as those in the examplein FIG. 131.

For example, in the example shown in FIG. 132, the three-dimensionaldata encoding device calculates a predicted value of point b2 based onpoint a0, point a1, point a2, and point b1.

For example, the three-dimensional data encoding device sequentiallyassigns predicted values to prediction modes, beginning with predictionmode 0, that is, beginning with the prediction mode of the smallestvalue, in ascending order of distance to the current three-dimensionalpoint.

Here, it is assumed that the predicted values are related in magnitudeaccording to b1>a1>a0>a2.

In this case, the three-dimensional data encoding device calculates amedian value of the predicted values, for example. Here, it is assumedthat a1 is a median value.

The three-dimensional data encoding device then calculates the medianvalue.

As shown in (b) of FIG. 132, the three-dimensional data encoding deviceassigns predicted value a1 selected as the median value to predictionmode 0, assigns predicted value b1 having been originally assigned toprediction mode 0 to prediction mode 1, and assigns predicted value a2having been originally assigned to prediction mode 1 to prediction mode2.

In this way, the three-dimensional data encoding device can generatepredicted value candidates (a table of prediction modes and predictedvalues linked to each other) by giving precedence to the median of theattribute values of the peripheral three-dimensional points while at thesame time giving precedence to a predicted value candidate closer indistance to the current three-dimensional point to assign the predictedvalue candidate to prediction mode 0. Therefore, the three-dimensionaldata encoding device can improve the encoding efficiency.

Note that, in the above description, the three-dimensional data encodingdevice assigns predicted values to prediction modes beginning with theprediction mode of the smallest value (beginning with prediction mode 0in the above description) by giving precedence to the median value oraverage value. However, the method of assigning predicted values toprediction modes is not necessarily limited thereto. For example, thethree-dimensional data encoding device may modify the assignment ofpredicted values based on some statistical information on predictedvalues.

For example, the three-dimensional data encoding device may usevariance, deviation or other information instead of the median value oraverage value.

FIG. 133 is a diagram showing a third example of the table containingpredicted values for prediction modes according to the presentvariation. (a) of FIG. 133 is a table showing an example of an initialstate of the predicted values assigned to the prediction modes, and (b)of FIG. 133 is a table showing an example in which assignment of thepredicted values to the prediction modes is modified from the stateshown in (a) of FIG. 133. The tables shown in FIG. 133 are tables in acase where the total number M of prediction modes is 4, and the numberof three-dimensional points in the periphery of the currentthree-dimensional point to be encoded that can be used for prediction is4.

It is assumed that the positional relationship between the points andthe attribute values of the points are the same as those in the examplein FIG. 131.

For example, in the example shown in FIG. 133, the three-dimensionaldata encoding device calculates a predicted value of point b2 based onpoint a0, point a1, point a2, and point b1.

For example, the three-dimensional data encoding device sequentiallyassigns predicted values to prediction modes, beginning with predictionmode 0, that is, beginning with the prediction mode of the smallestvalue, in ascending order of distance to the current three-dimensionalpoint.

Here, it is assumed that the predicted values are related in magnitudeaccording to b1>a1>a0>a2.

The three-dimensional data encoding device then calculates statisticalinformation. Statistics include median value, average value, variance,or standard deviation, for example.

As shown in (b) of FIG. 133, the three-dimensional data encoding deviceassigns predicted value a1 selected based on statistical information toprediction mode 0, and assigns predicted value b1 having been originallyassigned to prediction mode 0 to prediction mode 2 to which predictedvalue a1 has been assigned.

In this way, the three-dimensional data encoding device can generate apredicted value candidate by giving precedence to a value obtained basedon statistical information on the attribute values of the peripheralthree-dimensional points. Therefore, the three-dimensional data encodingdevice can improve the encoding efficiency.

Note that the three-dimensional data encoding device may add informationfor identifying the statistical information used for assignment ofpredicted values to the header of the bitstream.

In this way, the three-dimensional data decoding device can performassignment of predicted values based on the same statistical informationas that used by the three-dimensional data encoding device and thereforecan correctly decode the bitstream encoded by the three-dimensional dataencoding device based on the statistical information.

The three-dimensional data encoding device may determine whether topreferentially assign the median value to the prediction mode of thesmallest value based on the attribute (type) of the attributeinformation of the three-dimensional point to be encoded.

For example, the three-dimensional data encoding device maypreferentially assign the median value to the prediction mode of thesmallest value when encoding an attribute that can be effectivelyencoded if the median value is preferentially assigned to the predictionmode of the smallest value. For example, the three-dimensional dataencoding device preferentially assigns the median value to theprediction mode of the smallest value when encoding information ondegree of reflection, which is an example of the attribute informationand does not preferentially assign the median value when encoding colorinformation, which is another example of the attribute information.

When the three-dimensional data encoding device calculates a newpredicted value and adds (assigns) the new predicted value to aprediction mode as described above, the three-dimensional data encodingdevice may assign the new predicted value to prediction mode 0 or, inother words, may preferentially assign the new predicted value to theprediction mode of the smallest value.

For example, when the three-dimensional data encoding device encodescolor information, the three-dimensional data encoding device maycalculate a median value for each component of color information A(Y0,U0, V0), color information B(Y1, U1, V1), and color information C(Y2,U2, V2) on peripheral three-dimensional points to generate a newpredicted value (Y0, U1, V2), and assign the new predicted value toprediction mode 0. Note that, in the above description, Y0 is the medianvalue of Y0, Y1, and Y2, U1 is the median value of U0, U1, and U2, andV2 is the median value of V0, V1 and V2.

FIG. 134 is a flowchart of a three-dimensional data encoding process bythe three-dimensional data encoding device according to the presentvariation.

First, the three-dimensional data encoding device encodes geometryinformation (geometry) (S4301). For example, the three-dimensional dataencoding device may perform the encoding using an octree representation.

After the encoding of the geometry information, if the position of athree-dimensional point is changed because of quantization or the like,the three-dimensional data encoding device reassigns the attributeinformation on the original three-dimensional point to thethree-dimensional point changed in position (S4302). For example, thethree-dimensional data encoding device perform the reassignment byinterpolation of values of the attribute information according to theamount of change in position. For example, N three-dimensional pointsyet to be changed in position close to the three-dimensional position ofthe three-dimensional point changed in position are detected, and anweighted average of the values of the attribute information on the Nthree-dimensional points is taken based on the distance between thethree-dimensional position of the three-dimensional point changed inposition and each of the N three-dimensional points. Thethree-dimensional data encoding device designates the value obtained bythe weighted averaging as the value of the attribute information on thethree-dimensional point changed in position.

If the three-dimensional positions of two or more three-dimensionalpoints are changed to the same three-dimensional position because ofquantization or the like, the three-dimensional data encoding device mayassign an average value of the attribute information on the two or morethree-dimensional points yet to be changed in position as the values ofthe attribute information on the three-dimensional points changed inposition.

The three-dimensional data encoding device then encodes the reassignedattribute information (Attribute) (S4303). For example, when thethree-dimensional data encoding device encodes a plurality of kinds ofattribute information, the three-dimensional data encoding device maysequentially encode the plurality of kinds of attribute information. Forexample, when the three-dimensional data encoding device encodes colorand degree of reflection as attribute information, the three-dimensionaldata encoding device may generate a bitstream including the result ofencoding of color followed by the result of encoding of degree ofreflectance.

The order of a plurality of results of encoding of attribute informationappended to a bitstream can be any order.

The three-dimensional data encoding device may add informationindicating a starting point of the encoded data of each piece ofattribute information in the bitstream to the header or the like.

In this way, the three-dimensional data decoding device can decodeattribute information that needs to be decoded, and therefore can omitthe decoding process for attribute information that does not need to bedecoded. Therefore, the processing amount of the three-dimensional datadecoding device can be reduced.

The three-dimensional data encoding device may encode a plurality ofkinds of attribute information in parallel, and integrate the results ofthe encoding into one bitstream.

In this way, the three-dimensional data encoding device can encode aplurality of kinds of attribute information at a high speed.

FIG. 135 is a flowchart of the attribute information encoding process(S4303) shown in FIG. 134.

First, the three-dimensional data encoding device sets an LoD (S43031).That is, the three-dimensional data encoding device assigns eachthree-dimensional point to any of a plurality of LoDs.

The three-dimensional data encoding device then starts a loop on an LoDbasis (S43032). That is, the three-dimensional data encoding devicerepeatedly performs the process from step S43033 to step S43041 for eachLoD.

The three-dimensional data encoding device then starts a loop for eachthree-dimensional point (S43033). That is, the three-dimensional dataencoding device repeatedly performs the process from step S43034 to stepS43040 for each three-dimensional point at a certain LoD. Note that FIG.135 shows encoding of a current three-dimensional point P to be encoded.

The three-dimensional data encoding device then searches for a pluralityof peripheral points, which are three-dimensional points present in theperiphery of the current three-dimensional point P, that are used forcalculation of a predicted value of the current three-dimensional pointP to be processed (S43034).

The three-dimensional data encoding device then calculates a predictedvalue of the current three-dimensional point P (S43035). Specifically,the three-dimensional data encoding device calculates a weighted averageof values of the attribute information on the plurality of peripheralpoints, and sets the obtained value as the predicted value.

The three-dimensional data encoding device then calculates a predictionresidual, which is the difference between the attribute information andthe predicted value of the current three-dimensional point P (S43036).

The three-dimensional data encoding device then calculates a quantizedvalue by quantizing the prediction residual (S43037).

The three-dimensional data encoding device then arithmetically encodesthe quantized value (S43038).

The three-dimensional data encoding device then calculates an inversequantized value by inverse quantizing the quantized value (S43039).

The three-dimensional data encoding device then generates a decodedvalue by adding the predicted value to the inverse quantized value(S43040).

The three-dimensional data encoding device then ends the loop for eachthree-dimensional point (S43041).

The three-dimensional data encoding device also ends the loop for eachLoD (S43042).

FIG. 136 is a flowchart of the predicted value calculation process(S43035) shown in FIG. 135.

First, the three-dimensional data encoding device assigns a predictedvalue to a prediction mode (S4311).

Next, the three-dimensional data encoding device then calculates amaximum absolute differential value maxdiff of the attribute values ofthe N three-dimensional points in the periphery of the currentthree-dimensional point to be encoded (S4312).

The three-dimensional data encoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4313).

If the three-dimensional data encoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4313), thethree-dimensional data encoding device determines the prediction mode tobe 0 (S4314).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4315).

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4313), the three-dimensional data encoding device calculates the costof each prediction mode, and selects a prediction mode for which thecost is minimum (S4316).

The three-dimensional data encoding device then arithmetically encodesthe selected prediction mode (S4317).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4315).

Note that, in step S4317, as described above, the three-dimensional dataencoding device may arithmetically encode the prediction mode bybinarizing the prediction mode with a truncated unary code using thenumber of the prediction modes to which a predicted value is assigned.Alternatively, as described above, the three-dimensional data encodingdevice may arithmetically encode the prediction mode by binarizing theprediction mode with a truncated unary code using the total number M ofthe prediction modes, that is, the total number of the prediction modesincluding the prediction modes to which no predicted value is assigned.The three-dimensional data encoding device may encode the total number Mof prediction modes as NumPredMode and add the encoded data to theheader of the bitstream.

This allows the three-dimensional data decoding device to correctlydecode the encoded prediction mode by decoding NumPredMode in the headerof the bitstream.

Note that, when NumPredMode=1, the three-dimensional data encodingdevice does not have to encode the prediction mode.

In this way, the three-dimensional data encoding device can reduce thecode amount when NumPredMode=1.

FIG. 137 is a flowchart of the process (S4311) of assigning predictedvalues to prediction modes shown in FIG. 136.

First, the three-dimensional data encoding device assigns attributeinformation on N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be encoded to prediction modes 0to N−1 in ascending order of distance (S43111). For example, thethree-dimensional data encoding device generates N prediction modes andassigns attribute information on N peripheral three-dimensional pointsin the periphery of the current three-dimensional point to be encoded toprediction modes 1 to N−1 in ascending order of distance.

Note that, if N is greater than the maximum number M (NumPredMode) ofprediction modes to be added to the bitstream, the three-dimensionaldata encoding device may generate up to M prediction modes.

The three-dimensional data encoding device then calculates a median(median value) of the predicted values assigned to the prediction modes(S43112).

The three-dimensional data encoding device then assigns the median valuecalculated in step S43112 to prediction mode 0, and assigns thepredicted value having been originally assigned to prediction mode 0 toanother prediction mode (S43113).

FIG. 138 is a flowchart of details of the selection process for aprediction mode (S4316) shown in FIG. 136.

First, the three-dimensional data encoding device sets i at 0 andmincost at ∞ (S43161).

The three-dimensional data encoding device then calculates a cost(cost[i]) of i-th prediction mode PredMode[i] (S43162).

The three-dimensional data encoding device then determines whether acondition that cost[i]<mincost is satisfied or not (S43163).

If the three-dimensional data encoding device determines that thecondition that cost[i]<mincost is satisfied (Yes in S43163), thethree-dimensional data encoding device sets mincost at cost[i], and setsthe prediction mode to be PredMode[i] (S43164).

Following step S43164, or if the three-dimensional data encoding devicedetermines that the condition that cost[i]<mincost is not satisfied (Noin S43163), the three-dimensional data encoding device sets i at i+1(S43165).

The three-dimensional data encoding device then determines whether acondition that i<number of prediction modes (total number of predictionmodes) is satisfied or not (S43166).

If the three-dimensional data encoding device determines that thecondition that i<number of prediction modes is not satisfied (No inS43166), the three-dimensional data encoding device ends the selectionprocess. If the three-dimensional data encoding device determines thatthe condition that i<total number of prediction modes is satisfied (Yesin S43166), the process returns to step S43162.

FIG. 139 is a flowchart of a decoding process by the three-dimensionaldata decoding device according to the present variation.

The three-dimensional data decoding device decodes geometry information(geometry) on the encoded three-dimensional point (S4321). For example,the three-dimensional data decoding device may decode the geometryinformation using an octree representation.

The three-dimensional data decoding device decodes the attributeinformation on the encoded three-dimensional point (S4322).

Note that, when the three-dimensional data decoding device decodes aplurality of kinds of attribute information, the three-dimensional datadecoding device may sequentially decode the attribute information. Forexample, when the three-dimensional data decoding device decodes colorand degree of reflection as attribute information, the three-dimensionaldata decoding device may decode the bitstream including the result ofencoding of color followed by the result of encoding of degree ofreflectance in this order.

The three-dimensional data decoding device can decode the result ofencoding of the attribute information included in the bitstream in anyorder.

The three-dimensional data decoding device may be made to obtain astarting point of the encoded data of each piece of attributeinformation in the bitstream by decoding the header or the like.

In this way, the three-dimensional data decoding device can decodeattribute information that needs to be decoded. Therefore, thethree-dimensional data decoding device can omit the process of decodingattribute information that does not need to be decoded, thereby reducingthe processing amount.

The three-dimensional data decoding device may decode a plurality ofkinds of attribute information in parallel and integrate results of thedecoding into one three-dimensional point cloud.

In this way the three-dimensional data decoding device can decode aplurality of kinds of attribute information at a high speed.

FIG. 140 is a flowchart of the decoding process for attributeinformation (S4322) shown in FIG. 139.

First, the three-dimensional data decoding device sets an LoD (S43221).That is, the three-dimensional data decoding device assigns eachthree-dimensional point to any of a plurality of LoDs.

The three-dimensional data decoding device then starts a loop on an LoDbasis (S43222). That is, the three-dimensional data decoding devicerepeatedly performs the process from step S43223 to step S43229 for eachLoD.

The three-dimensional data decoding device then starts a loop for eachthree-dimensional point (S43323). That is, the three-dimensional datadecoding device repeatedly performs the process from step S43223 to stepS43228 for each three-dimensional point at a certain LoD. FIG. 140 showsdecoding of the current three-dimensional point P to be decoded.

The three-dimensional data decoding device then searches for a pluralityof peripheral points, which are three-dimensional points present in theperiphery of the current three-dimensional point P, that are used forcalculation of a predicted value of the current three-dimensional pointP to be processed (S43224).

The three-dimensional data decoding device then calculates a predictedvalue of the current three-dimensional point P (S43225).

Next, the three-dimensional data decoding device decodes the quantizedvalue of the current three-dimensional point P (S43226)

The three-dimensional data decoding device then calculates an inversequantized value by inverse quantizing the quantized value (S43227).

The three-dimensional data decoding device then generates a decodedvalue by adding the predicted value to the inverse quantized value(S43228).

The three-dimensional data decoding device then ends the loop for eachthree-dimensional point (S43229).

The three-dimensional data decoding device also ends the loop for eachLoD (S43230).

FIG. 141 is a flowchart of details of the calculation process for apredicted value (S43225) shown in FIG. 140.

First, the three-dimensional data decoding device assigns a predictedvalue to a prediction mode (S4331).

The three-dimensional data decoding device then calculates a maximumabsolute differential value maxdiff of the attribute values of the Nthree-dimensional points in the periphery of the currentthree-dimensional point to be decoded (S4332).

The three-dimensional data decoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4333).

If the three-dimensional data decoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4333), thethree-dimensional data decoding device determines the prediction mode tobe 0 (S4334).

The three-dimensional data decoding device then outputs the predictedvalue of the determined prediction mode (S4335).

On the other hand, if the three-dimensional data decoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4333), the three-dimensional data decoding device decodes theprediction mode from the bitstream (S4336).

The three-dimensional data decoding device then outputs the determinedprediction mode, that is, the predicted value of the prediction modedecoded in step S4336 (S4335).

Note that, in step S4336, as described above, the three-dimensional datadecoding device may arithmetically decode the prediction mode by usingthe number of prediction modes to which a predicted value is assigned.Alternatively, as described above, the three-dimensional data decodingdevice may arithmetically decode the prediction mode by using the totalnumber M of prediction modes. For example, the three-dimensional dataencoding device may encode the total number M of prediction modes asNumPredMode and add the encoded data to the header of the bitstream.

This allows the three-dimensional data decoding device to correctlydecode the encoded prediction mode by decoding NumPredMode in the headerof the bitstream.

Note that, when NumPredMode=1, the three-dimensional data encodingdevice does not have to encode the prediction mode.

In this way, the three-dimensional data encoding device can reduce thecode amount when NumPredMode=1.

FIG. 142 is a flowchart of the process (S4331) of assigning predictedvalues to prediction modes shown in FIG. 141.

First, the three-dimensional data decoding device assigns attributeinformation on N peripheral three-dimensional points in the periphery ofthe current three-dimensional point to be decoded to prediction modes 0to N−1 in ascending order of distance (S43311). For example, thethree-dimensional data decoding device generates N prediction modes andassigns attribute information on N peripheral three-dimensional pointsin the periphery of the current three-dimensional point to be decoded toprediction modes 1 to N−1 in ascending order of distance.

Note that, if N is greater than the maximum number M (NumPredMode) ofprediction modes to be added to the bitstream, the three-dimensionaldata decoding device may generate up to M prediction modes.

The three-dimensional data decoding device then calculates a median(median value) of the predicted values of the prediction modes (S43312).

The three-dimensional data decoding device then assigns the median valuecalculated in step S43312 to prediction mode 0, and assigns thepredicted value having been originally assigned to prediction mode 0 toanother prediction mode (S43313).

FIG. 143 is a flowchart of another example of the predicted valuecalculation process (S43035) shown in FIG. 135.

First, the three-dimensional data encoding device assigns predictedvalues to prediction modes (S4341).

The three-dimensional data encoding device then calculates a maximumabsolute differential value maxdiff of the attribute values of the Nthree-dimensional points in the periphery of the currentthree-dimensional point to be encoded (S4342).

The three-dimensional data encoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4343).

If the three-dimensional data encoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4343), thethree-dimensional data encoding device sets the prediction mode at 0(S4344).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4345).

On the other hand, if the three-dimensional data encoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4343), the three-dimensional data encoding device calculates a cost foreach prediction mode, and selects a prediction mode for which the costis minimum (S4346).

The three-dimensional data encoding device then arithmetically encodesthe selected prediction mode (S4347).

The three-dimensional data encoding device then outputs the predictedvalue of the determined prediction mode (S4345).

Note that, in step S4347, as described above, the three-dimensional dataencoding device may arithmetically encode the prediction mode bybinarizing the prediction mode with a truncated unary code using thenumber of the prediction modes to which a predicted value is assigned.Alternatively, as described above, the three-dimensional data encodingdevice may arithmetically encode the prediction mode by binarizing theprediction mode with a truncated unary code using the total number M ofprediction modes, that is, the total number of the prediction modesincluding the prediction modes to which no predicted value is assigned.The three-dimensional data encoding device may encode the total number Mof prediction modes as NumPredMode and add the encoded data to theheader of the bitstream.

This allows the three-dimensional data decoding device to correctlydecode the encoded prediction mode by decoding NumPredMode in the headerof the bitstream.

Note that, when NumPredMode=1, the three-dimensional data encodingdevice does not have to encode the prediction mode.

In this way, the three-dimensional data encoding device can reduce thecode amount when NumPredMode=1.

FIG. 144 is a flowchart of the process (S4341) of assigning predictedvalues to prediction modes shown in FIG. 143.

First, the three-dimensional data encoding device calculates a medianvalue of attribute values of N peripheral three-dimensional points inthe periphery of the current three-dimensional point to be encoded(S43411).

The three-dimensional data encoding device then assigns the median valuecalculated in step S43411 to prediction mode 0 (S43412).

The three-dimensional data encoding device then sequentially assigns theattribute values of the N−1 peripheral three-dimensional points otherthan the attribute value of the three-dimensional point selected as themedian value to prediction modes 1 to N, beginning with prediction mode1, in ascending order of distance to the current three-dimensional point(S43413). For example, the three-dimensional data encoding devicegenerates N prediction modes, and sequentially assigns the attributevalues of the N−1 peripheral three-dimensional points other than theperipheral three-dimensional point having the attribute value selectedas the median value to prediction modes 1 to N−1, beginning withprediction mode 1, in ascending order of distance.

Note that, if N is greater than the maximum number M (NumPredMode) ofprediction modes to be added to the bitstream, the three-dimensionaldata encoding device may generate up to M prediction modes.

FIG. 145 is a flowchart of details of the selection process for aprediction mode (S4346) shown in FIG. 143.

First, the three-dimensional data encoding device sets i at 0 andmincost at ∞ (S43461).

The three-dimensional data encoding device then calculates a cost(cost[i]) of i-th prediction mode PredMode[i] (S43462).

The three-dimensional data encoding device then determines whether acondition that cost[i]<mincost is satisfied or not (S43463).

If the three-dimensional data encoding device determines that thecondition that cost[i]<mincost is satisfied (Yes in S43463), thethree-dimensional data encoding device sets mincost at cost[i], and setsthe prediction mode to be PredMode[i] (S43464).

Following step S43464, or if the three-dimensional data encoding devicedetermines that the condition that cost[i]<mincost is not satisfied (Noin S43463), the three-dimensional data encoding device sets i at i+1(S43465).

The three-dimensional data encoding device then determines whether acondition that i<number of prediction modes (total number of predictionmodes) is satisfied or not (S43466).

If the three-dimensional data encoding device determines that thecondition that i<number of prediction modes is not satisfied (No inS43466), the three-dimensional data encoding device ends the selectionprocess. If the three-dimensional data encoding device determines thatthe condition that i<total number of prediction modes is satisfied (Yesin S43466), the process returns to step S43462.

FIG. 146 is a flowchart of another example of the predicted valuecalculation process (S43225) shown in FIG. 140.

First, the three-dimensional data decoding device assigns a predictedvalue to a prediction modes (S4351).

The three-dimensional data decoding device then calculates a maximumabsolute differential value maxdiff of the attribute values of the Nthree-dimensional points in the periphery of the currentthree-dimensional point to be decoded (S4352).

The three-dimensional data decoding device then determines whether acondition that maxdiff<Thfix is satisfied or not (S4353).

If the three-dimensional data decoding device determines that thecondition that maxdiff<Thfix is satisfied (Yes in S4353), thethree-dimensional data decoding device sets the prediction mode at 0(S4354).

The three-dimensional data decoding device then outputs the predictedvalue of the determined prediction mode (S4355).

On the other hand, if the three-dimensional data decoding devicedetermines that the condition that maxdiff<Thfix is not satisfied (No inS4353), the three-dimensional data decoding device decodes theprediction mode from the bitstream (S4356).

The three-dimensional data decoding device then outputs the determinedprediction mode, that is, the predicted value of the prediction modedecoded in step S4356 (S4355).

Note that, in step S4356, as described above, the three-dimensional datadecoding device may arithmetically decode the prediction mode by usingthe number of the prediction modes to which a predicted value isassigned. Alternatively, as described above, the three-dimensional datadecoding device may arithmetically decode the prediction mode by usingthe total number M of prediction modes. For example, thethree-dimensional data encoding device encodes the total number M ofprediction modes as NumPredMode and add the encoded data to the headerof the bitstream.

This allows the three-dimensional data decoding device to correctlydecode the encoded prediction mode by decoding NumPredMode in the headerof the bitstream.

Note that, when NumPredMode=1, the three-dimensional data encodingdevice does not have to encode the prediction mode.

In this way, the three-dimensional data encoding device can reduce thecode amount when NumPredMode=1.

FIG. 147 is a flowchart of the process (S4351) of assigning predictedvalues to prediction modes shown in FIG. 146.

First, the three-dimensional data decoding device calculates a medianvalue of attribute values of N peripheral three-dimensional points inthe periphery of the current three-dimensional point to be decoded(S43511).

The three-dimensional data decoding device then assigns the median valuecalculated in step S43511 to prediction mode 0 (S43512).

The three-dimensional data decoding device then sequentially assigns theattribute values of the N−1 peripheral three-dimensional points otherthan the attribute value of the three-dimensional point selected as themedian value to prediction modes 1 to N−1, beginning with predictionmode 1, in ascending order of distance to the current three-dimensionalpoint (S43513). For example, the three-dimensional data decoding devicegenerates N prediction modes, and sequentially assigns the attributevalues of the N−1 peripheral three-dimensional points other than theperipheral three-dimensional point having the attribute value selectedas the median value to prediction modes 1 to N−1, beginning withprediction mode 1, in ascending order of distance.

Note that, if N is greater than the maximum number M (NumPredMode) ofprediction modes to be added to the bitstream, the three-dimensionaldata decoding device may generate up to M prediction modes.

[Summary]

<Three-Dimensional Data Encoding Device>

As described above, the three-dimensional data encoding device accordingto the present embodiment and variations thereof performs the processshown in FIG. 148. Specifically, the three-dimensional data encodingdevice encodes attribute information on a plurality of three-dimensionalpoints each having attribute information.

FIG. 148 is a flowchart of an encoding process by the three-dimensionaldata encoding device according to the present embodiment and variationsthereof.

First, using attribute information on one or more secondthree-dimensional points in a periphery of a first three-dimensionalpoint, the three-dimensional data encoding device calculates a newpredicted value for calculating attribute information on the firstthree-dimensional point as a predicted value and assigns the newpredicted value to at least one prediction mode of two or moreprediction modes (S4361). Note that each of the first three-dimensionalpoint and the second three-dimensional point is one of a plurality ofthree-dimensional points. The first three-dimensional point and thesecond three-dimensional point are three-dimensional points that differfrom each other in at least one of geometry information and attributeinformation, for example. The second three-dimensional point (peripheralthree-dimensional point) is a three-dimensional point that is located inthe periphery of the first three-dimensional point and can be used forprediction of the attribute information on the current three-dimensionalpoint (first three-dimensional point) to be encoded. For example, thesecond three-dimensional point is a three-dimensional point that islocated within a predetermined arbitrary distance from the firstthree-dimensional point.

The three-dimensional data encoding device then selects one predictionmode from the two or more prediction modes (S4362).

The three-dimensional data encoding device then calculates a predictionresidual, which is the difference between the attribute information onthe first three-dimensional point and the predicted value of theselected one prediction mode (S4363).

The three-dimensional data encoding device then generates a bitstreamincluding the one prediction mode and the prediction residual (S4364).

For example, when the total number M of prediction modes is five, andthe number N of peripheral three-dimensional points is two, thethree-dimensional data encoding device assigns an average value ofattribute information of the peripheral three-dimensional points toprediction mode 0, and assigns attribute values of the two peripheralthree-dimensional points to prediction modes 1 and 2, respectively, aspredicted values of prediction modes. In this case, thethree-dimensional data encoding device assigns no predicted value toprediction modes 3 and 4.

When there is a prediction mode to which no predicted value is assigned,if the three-dimensional data encoding device and the three-dimensionaldata decoding device assign different predicted values to the predictionmode, the three-dimensional data decoding device cannot accuratelydecode the attribute information of the encoded three-dimensional data.To avoid this, the three-dimensional data encoding device assigns a newpredicted value to any prediction mode to which no predicted value isassigned. Here, the three-dimensional data encoding device designates apredicted value that can be used for prediction of the attributeinformation on the current three-dimensional point to be encoded (themedian value, the average value or the like described above, forexample) as the new predicted value.

In this way, the three-dimensional data encoding device can encode theattribute information on the current three-dimensional point to beencoded by including the new predicted value in the predicted valuecandidates. Therefore, the three-dimensional data encoding device canimprove the encoding efficiency. That is, the three-dimensional dataencoding device can reduce the code amount.

In the process (S4361) of calculating and assigning a new predictedvalue as a predicted value, for example, the three-dimensional dataencoding device calculates the median value of the values indicated bythe attribute information on the one or more second three-dimensionalpoints as the new predicted value.

In the process (S4361) of calculating and assigning a new predictedvalue as a predicted value, for example, the three-dimensional dataencoding device calculates the maximum value of the values indicated bythe attribute information on the one or more second three-dimensionalpoints as the new predicted value.

In these cases, since the median value or maximum value, which is likelyto be adopted as a predicted value, is included in the predicted valuesas a new predicted value, the three-dimensional data encoding device canmore easily improve the encoding efficiency.

For example, furthermore, before the process (S4361) of calculating andassigning a new predicted value as a predicted value, thethree-dimensional data encoding device determines whether there is aprediction mode to which no predicted value is assigned in the two ormore prediction modes. And if there is a prediction mode to which nopredicted value is assigned, the three-dimensional data encoding deviceperforms a process of calculating a new predicted value as a predictedvalue and assigning the new predicted value to the prediction mode towhich no predicted value is assigned.

For example, a predetermined predicted value is assigned to eachprediction mode. Here, depending on the number of the secondthree-dimensional points located in the periphery of the firstthree-dimensional point, all the prediction modes may not be assignedwith a predetermined predicted value. That is, there may be a predictionmode to which no predicted value is assigned. To cope with this, thethree-dimensional data encoding device determines whether there is aprediction mode to which no predicted value is assigned, and if there isa prediction mode to which no predicted value is assigned, performs aprocess of calculating a new predicted value and assigning the newpredicted value to the prediction mode to which no predicted value isassigned.

Thus, if there is a prediction mode to which no predicted value isassigned, the three-dimensional data encoding device performs theprocess of calculating a new predicted value and assigning the newpredicted value to the prediction mode, and, if there is no suchprediction mode, does not perform the process of calculating andassigning a new predicted value. Therefore, the three-dimensional dataencoding device can reduce the processing amount, and at the same time,improve the encoding efficiency.

For example, the three-dimensional data encoding device includes aprocessor and a memory and the processor performs the process describedabove using the memory. The memory may store a control program forperforming the process described above. The memory may further store amethod of calculating a new predicted value, information on the numberof prediction modes previously determined, or predetermined predictedvalues to be assigned to prediction modes, for example.

<Three-Dimensional Data Decoding Device>

The three-dimensional data decoding device according to the presentembodiment and variations thereof performs the process shown in FIG.149. Specifically, the three-dimensional data decoding device decodes aplurality of three-dimensional points each having encoded attributeinformation included in a bitstream.

FIG. 149 is a flowchart of a decoding process by the three-dimensionaldata decoding device according to the present embodiment and variationsthereof.

For example, first, the three-dimensional data decoding device selectsone of two or more encoded prediction modes included in a bitstreamreceived from the three-dimensional data encoding device (S4371).

Using attribute information on one or more second three-dimensionalpoints in a periphery of a first three-dimensional point, thethree-dimensional data decoding device then calculates, as a predictedvalue, a new predicted value for calculating attribute information onthe first three-dimensional point that corresponds to the one predictionmode selected in step S4371 (S4372).

The three-dimensional data decoding device then calculates the attributeinformation on the first three-dimensional point using the predictedvalue calculated in step S4372 (S4373).

In this way, the three-dimensional data decoding device can calculatethe same new predicted value as the new predicted value assigned by thethree-dimensional data encoding device, assign the new predicted valueto the prediction mode, and appropriately decode the bitstream of theencoded attribute information.

In the process (S4372) of calculating a new predicted value as apredicted value, for example, the three-dimensional data decoding devicecalculates the median value of the values indicated by the attributeinformation on the one or more second three-dimensional points as thenew predicted value.

In the process (S4372) of calculating a new predicted value as apredicted value, for example, the three-dimensional data decoding devicecalculates the maximum value of the values indicated by the attributeinformation on the one or more second three-dimensional points as thenew predicted value.

In these cases, the three-dimensional data decoding device canappropriately perform the decoding even when the median value or maximumvalue, which is likely to be adopted as a predicted value, is includedin the predicted values as a new predicted value.

For example, furthermore, before the process (S4372) of calculating anew predicted value as a predicted value, the three-dimensional datadecoding device determines whether a predicted value is assigned to theselected one prediction mode. And if no predicted value is assigned tothe selected one prediction mode, the three-dimensional data decodingdevice performs the process (S4372) of calculating a new predicted valueas a predicted value.

For example, a predetermined predicted value is assigned to eachprediction mode. Here, depending on the number of the secondthree-dimensional points located in the periphery of the firstthree-dimensional point, all the prediction modes may not be assignedwith a predetermined predicted value. That is, there may be a predictionmode to which no predicted value is assigned. To cope with this, thethree-dimensional data decoding device determines whether there is aprediction mode to which no predicted value is assigned, and if there isa prediction mode to which no predicted value is assigned, performs aprocess of calculating a new predicted value and assigning the newpredicted value to the prediction mode to which no predicted value isassigned.

Thus, if there is a prediction mode to which no predicted value isassigned, the three-dimensional data decoding device performs theprocess of calculating a new predicted value and assigning the newpredicted value to the prediction mode, and, if there is no suchprediction mode, does not perform the process of calculating andassigning a new predicted value. Therefore, the three-dimensional datadecoding device can reduce the processing amount, and at the same time,decode the appropriately encoded attribute information.

For example, the three-dimensional data decoding device includes aprocessor and a memory, and the processor performs the process describedabove using the memory. The memory may store a control program forperforming the process described above. The memory may further store amethod of calculating a new predicted value, information on the numberof prediction modes previously determined, or predetermined predictedvalues to be assigned to prediction modes, for example.

A three-dimensional data encoding device, a three-dimensional datadecoding device, and the like according to the embodiments of thepresent disclosure have been described above, but the present disclosureis not limited to these embodiments.

Note that each of the processors included in the three-dimensional dataencoding device, the three-dimensional data decoding device, and thelike according to the above embodiments is typically implemented as alarge-scale integrated (LSI) circuit, which is an integrated circuit(IC). These may take the form of individual chips, or may be partiallyor entirely packaged into a single chip.

Such IC is not limited to an LSI, and thus may be implemented as adedicated circuit or a general-purpose processor. Alternatively, a fieldprogrammable gate array (FPGA) that allows for programming after themanufacture of an LSI, or a reconfigurable processor that allows forreconfiguration of the connection and the setting of circuit cellsinside an LSI may be employed.

Moreover, in the above embodiments, the structural components may beimplemented as dedicated hardware or may be realized by executing asoftware program suited to such structural components. Alternatively,the structural components may be implemented by a program executor suchas a CPU or a processor reading out and executing the software programrecorded in a recording medium such as a hard disk or a semiconductormemory.

The present disclosure may also be implemented as a three-dimensionaldata encoding method, a three-dimensional data decoding method, or thelike executed by the three-dimensional data encoding device, thethree-dimensional data decoding device, and the like.

Also, the divisions of the functional blocks shown in the block diagramsare mere examples, and thus a plurality of functional blocks may beimplemented as a single functional block, or a single functional blockmay be divided into a plurality of functional blocks, or one or morefunctions may be moved to another functional block. Also, the functionsof a plurality of functional blocks having similar functions may beprocessed by single hardware or software in a parallelized ortime-divided manner.

Also, the processing order of executing the steps shown in theflowcharts is a mere illustration for specifically describing thepresent disclosure, and thus may be an order other than the shown order.Also, one or more of the steps may be executed simultaneously (inparallel) with another step.

A three-dimensional data encoding device, a three-dimensional datadecoding device, and the like according to one or more aspects have beendescribed above based on the embodiments, but the present disclosure isnot limited to these embodiments. The one or more aspects may thusinclude forms achieved by making various modifications to the aboveembodiments that can be conceived by those skilled in the art, as wellforms achieved by combining structural components in differentembodiments, without materially departing from the spirit of the presentdisclosure.

Although only some exemplary embodiments of the present disclosure havebeen described in detail above, those skilled in the art will readilyappreciate that many modifications are possible in the exemplaryembodiments without materially departing from the novel teachings andadvantages of the present disclosure. Accordingly, all suchmodifications are intended to be included within the scope of thepresent disclosure.

INDUSTRIAL APPLICABILITY

The present disclosure is applicable to a three-dimensional dataencoding device and a three-dimensional data decoding device.

What is claimed is:
 1. A three-dimensional data encoding method ofencoding three-dimensional points, the three-dimensional data encodingmethod comprising: calculating a new predicted value as a predictedvalue, using attribute information items of one or more secondthree-dimensional points neighboring a first three-dimensional point,and assigning the predicted value to at least one prediction mode amongtwo or more prediction modes, the new predicted value being used forcalculating an attribute information item of the first three-dimensionalpoint; selecting one prediction mode from the two or more predictionmodes; calculating a prediction residual which is a difference betweenthe attribute information item of the first three-dimensional point andthe predicted value of the one prediction mode selected; and generatinga bitstream including the one prediction mode and the predictionresidual.
 2. The three-dimensional data encoding method according toclaim 1, wherein in the calculating of the new predicted value as thepredicted value, a median of values indicated by the attributeinformation items of the one or more second three-dimensional points iscalculated as the new predicted value.
 3. The three-dimensional dataencoding method according to claim 1, wherein in the calculating of thenew predicted value as the predicted value, a maximum value among valuesindicated by the attribute information items of the one or more secondthree-dimensional points is calculated as the new predicted value. 4.The three-dimensional data encoding method according to claim 1, furthercomprising: determining whether a prediction mode to which a predictedvalue is not assigned is present among the two or more prediction modes,before the calculating of the new predicted value as the predictedvalue, wherein when a prediction mode to which a predicted value is notassigned is present, the new predicted value is calculated as thepredicted value, and the predicted value is assigned to the predictionmode to which a predicted value is not assigned.
 5. A three-dimensionaldata decoding method of decoding encoded three-dimensional points, thethree-dimensional data decoding method comprising: selecting oneprediction mode from two or more prediction modes included in abitstream; calculating a new predicted value as a predicted value, usingattribute information items of one or more second three-dimensionalpoints neighboring a first three-dimensional point, the new predictedvalue being used for calculating an attribute information item of thefirst three-dimensional point corresponding to the one prediction modeselected; and calculating the attribute information item of the firstthree-dimensional point using the predicted value calculated.
 6. Thethree-dimensional data decoding method according to claim 5, wherein inthe calculating of the new predicted value as the predicted value, amedian of values indicated by the attribute information items of the oneor more second three-dimensional points is calculated as the newpredicted value.
 7. The three-dimensional data decoding method accordingto claim 5, wherein in the calculating of the new predicted value as thepredicted value, a maximum value among values indicated by the attributeinformation items of the one or more second three-dimensional points iscalculated as the new predicted value.
 8. The three-dimensional datadecoding method according to claim 5, further comprising: determiningwhether a prediction mode to which a predicted value is not assigned ispresent among the two or more prediction modes, before the calculatingof the new predicted value as the predicted value, wherein when aprediction mode to which a predicted value is not assigned is present,the calculating of the new predicted value as the predicted value isperformed.
 9. A three-dimensional data encoding device that encodesthree-dimensional points, the three-dimensional data encoding devicecomprising: a processor; and memory, wherein using the memory, theprocessor: calculates a new predicted value as a predicted value, usingattribute information items of one or more second three-dimensionalpoints neighboring a first three-dimensional point, and assigns thepredicted value to at least one prediction mode among two or moreprediction modes, the new predicted value being used for calculating anattribute information item of the first three-dimensional point; selectsone prediction mode from the two or more prediction modes; calculates aprediction residual which is a difference between the attributeinformation item of the first three-dimensional point and the predictedvalue of the one prediction mode selected; and generates a bitstreamincluding the one prediction mode and the prediction residual.
 10. Athree-dimensional data decoding device that decodes encodedthree-dimensional points, the three-dimensional data decoding devicecomprising: a processor; and memory, wherein using the memory, theprocessor: selects one prediction mode from two or more prediction modesincluded in a bitstream; calculates a new predicted value as a predictedvalue, using attribute information items of one or more secondthree-dimensional points neighboring a first three-dimensional point,the new predicted value being used for calculating an attributeinformation item of the first three-dimensional point corresponding tothe one prediction mode selected; and calculates the attributeinformation item of the first three-dimensional point using thepredicted value calculated.